Dump an array to a file

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

Copy this code and paste it in your HTML
  1. var_dump($GLOBALS);
  2. $data = ob_get_clean();
  3. $fp = fopen("textfile.txt", "w");
  4. fwrite($fp, $data);
  5. fclose($fp);

URL: http://www.sitepoint.com/forums/showthread.php?t=452250

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.