laravel:PHP工匠突然停止工作 [英] laravel : php artisan suddenly stop working
问题描述
我知道那里有很多问题,但是我的问题似乎根本解决不了.
I know that there bunch of questions out there but mine doesn't seems fit in any.
我正在研究laravel. php artisan
一个小时前工作正常.之后,我创建了一个控制器,一个模型和少量视图刀片.
I am working on laravel. php artisan
was working fine an hour before. After that i just created a controller, a model and few views blade.
现在的工匠根本无法工作,并且完全没有错误.甚至php artisan --version
也不会显示任何内容.
Now artisan simply won't work and no error at all. Even php artisan --version
won't show anything.
我不要进行任何重大更改,例如安装作曲家,或更新或安装任何新软件包.没有任何服务器配置.这只是控制器,模型和视图的基本编码.
I DIDN'T do any major changes like composer install, or update or install any new package. Neither any server configuration. It was just basic coding on controller , model and views.
不确定是什么原因造成的.可能是什么原因,我应该如何开始调试它?
Not sure what is causing this. What could be the reason and how shall i start debugging it?
推荐答案
Artisan是Laravel的集成部分,这意味着它使用控制台
Artisan is an integrated part of Laravel, meaning it's using a console Application
instance to run a command, and it will stop execution for errors which may come from any part of your application.
语法错误可能是导致artisan
停止工作的常见原因,并且如果未启用调试功能,则不会显示错误(仅记录错误),因此在运行命令时不会输出任何信息.
Syntax errors can be a common culprit that will stop artisan
from working, and if debugging is not enabled errors are not displayed (just logged) so you get no output when running a command.
要搜索语法错误,请转到您的项目目录,然后尝试通过运行以下命令来整理整个目录:
To search for syntax errors, go to your project directory and try linting the entire directory by running this command:
find -L ./ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l | grep "Errors parsing".
如果存在任何语法错误,该命令将输出第一个有错误的文件,出现错误的行以及错误消息.
If any syntax errors are present, the command will output the first file that has an error, the line where it occurs and the error message.
这篇关于laravel:PHP工匠突然停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!