Return to Snippet

Revision: 19718
at October 29, 2009 12:29 by Nek


Initial Code
$log = fopen( dirname(__FILE__)."/log.txt", "a" );  
ob_start();
var_dump($result);
$data = ob_get_clean();
fwrite($log, $data);
fclose($log);

Initial URL

                                

Initial Description
Create log.txt in scripts directory and set permissions to 0666 before use.

Initial Title
Dump var into the file in the scripts's directory.

Initial Tags
object, file, array, log

Initial Language
PHP