XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
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:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938