十万个为什么 [php] Ubuntu Apache2开启php错误打印
在Ubuntu下php的缺省设置是不显示错误信息的,如果程序出错会显示“无法处理此请求的错误提示”,这在开发环境下非常不方便。
其实我们只要编辑下apache的配置文件就好
1、我的apache 配置文件目录是/etc/apache2/apache2.conf
sudo vim /etc/apache2/apache2.conf
再最后加入以下两行
php_flag display_errors on
php_value error_reporting 2039
2、重启apache
sudo service apache2 restart
浙公网安备 33010602011771号