PHP 7-不支持的声明'strict_types' [英] PHP 7 - Unsupported declare 'strict_types'
问题描述
我在一个小型项目中使用PHP 7,在本地和生产服务器中也使用相同的配置.都可以在我的本地服务器上工作,但是在为LAMP进行设置后在生产服务器上我无法在/etc/php/7.0/apache下找到apache文件夹,所以我遇到了内部服务器错误,所以我在apache中添加了.conf
Im using PHP 7 for a small project, also using same configs in my local and production server. all works on my local server but on production server after doing the set up for LAMP i was unable to find the apache folder under /etc/php/7.0/apache, so what i was getting an internal server error so i added the in apache.conf
<VirtualHost 127.0.0.1:80>
PHPINIDir /path/to/new/php_ini
</VirtualHost>
然后内部服务器错误消失了,现在我正在得到这个信息:
Then the internal server error disappeared and now im getting this:
Warning: Unsupported declare 'strict_types' in /var/www/html/index.php on line 2
知道为什么!! 预先感谢
Any idea why!! Thanks in advance
推荐答案
在laravel 5.8中,我安装了PHP版本7.2,并且正常工作
in laravel 5.8 i install PHP version 7.2 and worked
这篇关于PHP 7-不支持的声明'strict_types'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!