开发者

PHP how do I turn on the in browser error logging

For example if my PHP script throws an error I want it to print to开发者_开发问答 the browser. I am on a linux box Debian 5.0


Put this that the top of your php file:

//*DEBUG ERROR REPORTING
ini_set('display_errors', 1); 
ini_set('log_errors', 1); 
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); 
error_reporting(E_ALL);
//END DEBUG ERROR REPORTING*/


Set the ini variable display_error to 1, to display errors to the browsers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜