简体   繁体   English

如何防止意外的语法错误?

[英]How can I prevent an unexpected Syntax error?

I tried to execute this command in the terminal: 我试图在终端中执行以下命令:

php bin/console cache:clear --env=prod --no-debug

But I get the following error message: 但是我收到以下错误消息:

Parse error: syntax error, unexpected '?' in /is/htdocs/myhost/www/project/bin/console on line 26

Symfony4 requires PHP v7.1.3 or higher. Symfony4需要PHP v7.1.3或更高版本。

Check your PHP version using php -v . 使用php -v检查您的PHP版本。

If you have the correct version try running composer install . 如果版本正确,请尝试运行composer install This will install any missing dependencies and should fix the error. 这将安装所有缺少的依赖项,并且应该纠正错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM