function yk_debug_log($str) { $msg = date('Y/m/d H:i:s', time()) . ' ' . $str . "\n"; $log_file = dirname(__FILE__) . '/log/debug.log'; $f = fopen($log_file, 'a+'); fwrite($f, $msg); if (is_array($str)) { ob_start(); var_dump($str); $buf = ob_get_contents(); ob_end_clean(); fwrite($f, $buf); } fclose($f); }
0 件のコメント:
コメントを投稿