Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Save log to disk
function Log($texto)
{
$tw = $texto;
if (is_array($texto))
{
ob_start();
print_r($texto);
$tw = ob_get_contents();
ob_end_clean();
}
$fp = fopen("log.txt", "w");
fwrite($fp, date("d/m/y d:H:is") . " " . $texto . "\n");
fclose($fp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.