Permalink
Browse files

Fixed bug with error logging.

  • Loading branch information...
Xeoncross committed Dec 11, 2010
1 parent 91c8091 commit 0a4904f338ebc237ffb310a542e119d0cdd27cec
Showing with 1 addition and 1 deletion.
  1. +1 −1 functions.php
View
@@ -7,7 +7,7 @@ function __autoload($c){require p("classes/$c");}
function c($k){static$c;$c=$c?$c:require p('config');return$c[$k];}
function dump($v){return'<pre>'.print_r($v,1).'</pre>';}
function post($k,$d='',$s=1){$v=v($_POST[$k],$d);return($s&&is_string($v))?$v:(!$s&&is_array($v)?$v:$d);}
-function _log($m){file_put_contents('log/.'.date('Y-m-d'),time().' '.getenv('REMOTE_ADDR')." $m\n",FILE_APPEND);}
+function _log($m){file_put_contents(__DIR__.'/log/.'.date('Y-m-d'),time().' '.getenv('REMOTE_ADDR')." $m\n",FILE_APPEND);}
function h($s){return htmlspecialchars($s,ENT_QUOTES,'utf-8');}
function redirect($u='',$r=0,$c=302){header($r?"Refresh:0;url=$u":"Location: $u",TRUE,$c);}
function registry($k,$v=null){static$o;return(func_num_args()>1?$o[$k]=$v:(isset($o[$k])?$o[$k]:NULL));}

0 comments on commit 0a4904f

Please sign in to comment.