一个安全的快速写日志的函数-PHP源码
php代码
>> " . number_format(microtime(TRUE), 5, ".", "") . ' ' . " : " . $level . "\t" . $msg;
$base = M_PRO_DIR . "/Log";
$dest = $base . "/" . date("YmdH", time()) . 'log.php';
if (!file_exists($dest)) {
@mkdir($base, 0777, TRUE);
@file_put_contents($dest, "\r\n", FILE_APPEND);
}
if (file_exists($dest)) {
@file_put_contents($dest, $record . "\r\n", FILE_APPEND);
}
}
}
/php/35780.htmlwww.phpzy.comtrue/php/35780.htmlTechArticle一个安全的快速写日志的函数-PHP源码 php代码 >> " . number_format(microtime(TRUE), 5, ".", "") . . " : " . $level . "\t" . $msg; $base = M_PRO_DIR . "/Log"; $dest = $base . "/" . date("YmdH", time()) . log.php; if (!file_exis...
PHP之友评论