function ewTrace($msg) { $filename = "debug.txt"; if (!$handle = fopen($filename, 'a')) exit; if (is_writable($filename)) fwrite($handle, $msg . "\n"); fclose($handle);}Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script.