PHP does not display error messages
I installed XAMPP 1.7.4 (with PHP 5.3.5), the problem is PHP does not display any error messages. Eg if I connect to MYSQL with mysql_connect()
without parameters, PHP will not complain about the required fields.
Why is this?
How can I configure PHP to display errors?
To turn on errors at the script level, include at the top of your script:
ini_set('display_errors', 1);
error_reporting(~0);
Alternatively, if it is not a production site and simply a development / testing site, you can turn on error reporting in php.ini. Search it for these settings:
error_reporting = E_ALL
;error_reporting = E_ERROR
display_errors = On
;display_errors = Off
May be the display error is off
add in .htaccess file of your application.
php_value display_errors on
OR
use this at the top of your php script
ini_set('display_errors',"1");
It possibly did override your settings in the php.ini. Check the php.ini for error handling parameters and make sure they're switched on.
Happened to me a few weeks ago, too
链接地址: http://www.djcxy.com/p/11866.html上一篇: PHP:“注意:未定义的变量”,“注意:未定义的索引”和“注意:未定义的偏移量”
下一篇: PHP不显示错误消息