view dlog.php @ 49:a67bf725e87b

put both paths in include_path and depend on that
author Charlie Root
date Wed, 16 Jan 2019 13:42:15 -0500
parents dbc006408d2b
children 7f90ac957713
line wrap: on
line source

<?php
if (isset($_SERVER['DOCUMENT_ROOT'])) {
  $logfile=$_SERVER['DOCUMENT_ROOT']."/debug/debug.log";
}
 else {
   $logfile="/tmp/php_debug.log";
 }

function dl($s) {
  global $logfile;
  file_put_contents($logfile,$s,FILE_APPEND);
}