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

/ Published in: PHP
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. $log = fopen( dirname(__FILE__)."/log.txt", "a" );
  2. var_dump($result);
  3. $data = ob_get_clean();
  4. fwrite($log, $data);
  5. fclose($log);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.