【发布时间】:2019-12-28 22:39:27
【问题描述】:
VmWare 云服务器
CentOS Linux 7.6.1810 - Php 5.6.40 - Apache/2.4.6
test.php
<?php
echo($x);
phpinfo();
?>
输出:
注意:/var/www/html/test.php 第 1 行中未定义的变量 x
在 phpinfo 输出的 CORE 部分我有
display_errors 关闭
display_startup_errors 关闭
error_reporting 0
为什么会显示通知?
我不想显示任何错误/通知/警告等。
【问题讨论】:
-
尝试将
error_reporting(E_ERROR | E_PARSE);放在<?php之后以避免警告。
标签: php centos7 error-reporting