Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel-Artisan优化上的错误_Php_Laravel_Ubuntu_Laravel 5_Webserver - Fatal编程技术网

Php Laravel-Artisan优化上的错误

Php Laravel-Artisan优化上的错误,php,laravel,ubuntu,laravel-5,webserver,Php,Laravel,Ubuntu,Laravel 5,Webserver,我尝试在中使用ssh运行以下命令 vhost文件夹 php artisan optimize php artisan config:cache php artisan route:cache 但是我得到了以下错误 [Symfony\Component\Debug\Exception\FatalErrorException] 'continue' not in the 'loop' or 'switch' context 我该怎么做。 因为应用程序在本地主机上运行良好。但是当在Web服务

我尝试在中使用ssh运行以下命令 vhost文件夹

php artisan optimize
php artisan config:cache
php artisan route:cache 
但是我得到了以下错误

[Symfony\Component\Debug\Exception\FatalErrorException]
  'continue' not in the 'loop' or 'switch' context
我该怎么做。 因为应用程序在本地主机上运行良好。但是当在Web服务器上运行时,我得到了如下错误

file_put_contents(E:\wamp\www\test\server-migrate\megashopping_dk_files\storage\framework\views/30b1ec2c5a454e2084c2f1b072c9370d42561717.php): failed to open stream: No such file or directory

我过去常犯这个错误。看来是权限问题。在
/var/www
上运行此命令
如果是Ubuntu/Debian:

chown -R www-data:www-data test
chown -R apache:apache test
如果是CentOS:

chown -R www-data:www-data test
chown -R apache:apache test

希望这有帮助

您的文件夹/文件似乎没有写入此文件的正确权限…我需要更改哪个文件夹权限。它是
storage
吗?我是否应该将其设置为777?我已经运行了此命令
chmod-R guo+w storage
。但我仍然得到了错误。如果命令有效,您是否检查了权限?运行该命令后,它不会显示任何错误。意思是没事。在
php-artisan-config:cache
-
╰─➤  php artisan缓存:清除255↵ PHP致命错误:'continue'不在/var/www/c lients/client1/web1/web/megashopping\u dk\u files/app/Console/Commands/retailerUpdate中的'loop'或'switch'上下文中e.php,第231行