开发者

PHP how do I turn on the in browser error logging

开发者 https://www.devze.com 2023-04-04 09:42 出处:网络
For example if my PHP script throws an error I want it to print to开发者_开发问答 the browser. I am on a linux boxDebian 5.0Put this that the top of your php file:

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

精彩评论

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