1.通过:phpinfo()去找 error_log 结果得到:
error_log no value
2.然后去编辑php.ini,修改三处地方
vi /etc/php.ini
error_log = /var/log/php_errors.log
display_errors = on
# 开发环境设置值: E_ALL
# 生产环境设置值: E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
赋权限
touch /var/log/php_errors.log
chmod +rw /var/log/php_errors.log
重启php-fpm
systemctl stop php-fpm
systemctl start php-fpm
发表评论 登录: