The below code is an example of providing some debug information by both email and logging the information to a file in “/var/logs/”. define(“CURRENT_FILE”, “thisfile.php”); define(“LOG_FILE_LOCATION”, “/var/log/”); function log_file($error1, $error2, $file) { $ok = true; // $file = “logile.txt”; if ($fh = fopen($file, ‘a’)) { $ok = true; $conf = “$error1 – $error2\n”; } else…