Skip to content

Instantly share code, notes, and snippets.

@coulterpeterson
Created December 4, 2019 21:11
Show Gist options
  • Save coulterpeterson/ab91c9399592827c22d6d2708bf74a0d to your computer and use it in GitHub Desktop.
Save coulterpeterson/ab91c9399592827c22d6d2708bf74a0d to your computer and use it in GitHub Desktop.
Dump variable contents to file and chmod it with #PHP
function writeLog($item){
ob_flush();
ob_start();
var_dump($item);
file_put_contents('debuglog.txt', ob_get_flush());
chmod('debuglog.txt', 0664);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment