Thursday, March 19, 2009

Debugging technique: capture and email your ouput

Debugging technique: capture and email your ouput
Submitted by Eric on Wed, 08/13/2008 - 08:38
Tags:debug email Mail ob_end_clean ob_get_contents ob_start
Here's a quick debugging technique to capture your output and email it to yourself. This can be useful when you cannot send your debug output to the browser.

// start output buffer

// display the contents of your variable

// get the contents of the output buffer
$ob = ob_get_contents();

// stop output buffer

// mail contents of output buffer to yourself
mail('YOUREMAIL','Output Buffer Contents',$ob);

1 comment:

Unknown said...

I think that you may be interested in another application that quickly eliminates data corruption issues in database files, please take a look at download recovery sql file freeware tool and let me know what do you think