开发者

errors are not displaying in PHP script

开发者 https://www.devze.com 2022-12-12 23:58 出处:网络
I have tried with these code: error_reporting(E_ALL^E_NOTICE); ini_set(\"display_startup_errors\",\"on\");

I have tried with these code:

error_reporting(E_ALL^E_NOTICE);

ini_set("display_startup_errors","on");
ini_set("track_errors","on");
ini_set("error_reporting","E_ALL^E_NOTICE");

But sti开发者_Python百科ll errors are not appearing on my script.It just displaying only blank white screen when any error occur.Please guide me.


It could be that your provider has set PHP errors not to be output, but logged internally. I have experienced this before. In that case, a custom error handler may help you. Before, though, make sure you have no @s in front of any statements and log_errors is on. Also run a phpinfo() to double-check whether all reporting settings are activated.

Also, a completely blank page could be a structural parse error. Check with a simple error-inducing statement like

ecxho("hello world");  

first.


how about:

ini_set('display_errors', 1);

?


Is this on your own server? Or shared hosting etc? It's likely that error reporting is turned off at the server level. (The reason is usually 'security' but I don't see how it's really a security issue.)

Either edit your server config (php.ini) if you have access to it, or contact your host. They may be able to provide access to error logs.

0

精彩评论

暂无评论...
验证码 换一张
取 消