00001 <?php 00002 function debug($msg) { 00003 $fp = fopen("/info/www/test/soc/logs/debug.log","a"); 00004 if ($fp) { 00005 fwrite($fp,$msg.PHP_EOL); 00006 fclose($fp); 00007 } else { 00008 die("Can't open log"); 00009 } 00010 } 00011 ?>