5 这个是什么错误,ErrorException in File.php line 37

[2] ErrorException in File.php line 37

file_put_contents(/var/www/html/runtime/temp/e4713b64659a8e8b95aaa4d80b79f35c.php): failed to open stream: Permission denied

    {

        // 检测模板目录

        $dir = dirname($cacheFile);


        if (!is_dir($dir)) {

            mkdir($dir, 0755, true);

        }


        // 生成模板缓存文件

        if (false === file_put_contents($cacheFile, $content)) {

            throw new Exception('cache write error:' . $cacheFile, 11602);

        }

    }


    /**

     * 读取编译编译

     * @access public

     * @param  string  $cacheFile 缓存的文件名

     * @param  array   $vars 变量数组

Call Stack

in File.php line 37

at Error::appError(2, 'file_put_contents(/v...', '/var/www/html/thinkp...', 37, ['cacheFile' => '/var/www/html/runtim...', 'content' => '<?php /*a:5:{s:55:"/...', 'dir' => '/var/www/html/runtim...'])

at file_put_contents('/var/www/html/runtim...', '<?php /*a:5:{s:55:"/...') in File.php line 37

at File->write('/var/www/html/runtim...', '<?php /*a:5:{s:55:"/...') in Template.php line 399

at Template->compiler('<?php /*a:5:{s:55:"/...', '/var/www/html/runtim...') in Template.php line 218

at Template->fetch('/var/www/html/applic...', ['action' => 'index'], []) in Think.php line 93

at Think->fetch('/var/www/html/applic...', ['action' => 'index'], []) in View.php line 189

at View->fetch('', ['action' => 'index'], []) in Controller.php line 161

at Controller->fetch() in Index.php line 84

at Index->Index()

at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 395

at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), []) in Module.php line 132

at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)

at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185

at Middleware->think\{closure}(object(Request))

at call_user_func(object(Closure), object(Request)) in Middleware.php line 130

at Middleware->dispatch(object(Request), 'controller') in Module.php line 137

at Module->exec() in Dispatch.php line 168

at Dispatch->run() in App.php line 432

at App->think\{closure}(object(Request), object(Closure), null)

at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185

at Middleware->think\{closure}(object(Request)) in SystemEnvCheck.php line 42

at SystemEnvCheck->handle(object(Request), object(Closure), null)

at call_user_func_array([object(SystemEnvCheck), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185

at Middleware->think\{closure}(object(Request))

at call_user_func(object(Closure), object(Request)) in Middleware.php line 130

at Middleware->dispatch(object(Request)) in App.php line 435

at App->run() in index.php line 24

at require('/var/www/html/public...') in index.php line 16

请先 登录 后评论

1 个回答

admin
擅长:ShopXO,PHP,服务器,前端

环境有问题,如非专业人员建议采用集成环境软件部署,如宝塔 https://www.bt.cn/?invite_code=MV9kZHh6b2Y=

请先 登录 后评论
  • 1 关注
  • 0 收藏,154 浏览
  • lovconky 提出于 2019-09-17 22:58

相似问题