Sign In/My Account | View Cart  
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: Header Output
Date: 2007-02-22 19:02:21
From: Davin_Thompson
Response to: Header Output

A quick little fix to that for debugging and beyond... It'll save you hours of headache!


For your php backend pages, redefine the error handeler and output all errors to a logfile. You can then tail that logfile, see all warnings and errors, without throwing your entire ajax response =)


quickie example from memory:


set_error_handler(log_to_file);
...
...
function log_to_file($errnum, $errstr) {
$log = fopen("logfile.txt", "+w");
fwrite($log, $errstr);
}


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Sponsored By: