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.
精彩评论