【laravel5.*】运行 php artisan --version报错:PHP Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /www/web/crm/artisan on line 31

1、 

The above problem occurs because the php version is lower than 5.6, because the original default php of my system is 5.3, and the php installed with laravel is the specified 5.6.21 version, so I am executing the php artisan and php composer commands corresponding to laravel.

When you need to specify which php to execute, that is, you need to specify the absolute path of php.

 

2. Error code: root directory>artisan file

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326389832&siteId=291194637