PHP头条
热点:

一个安全的快速写日志的函数-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);
        }
    }
}

www.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之友评论

今天推荐