日志测试法
/**
* 写入日志
*/
function write2log($content,$filename='log') {
$myfile = fopen($filename.".txt", "a+") or die("Unable to open file!");
$txt = date('Y-m-d H:i:s')."\t".$content."\r\n";
fwrite($myfile, $txt);
fclose($myfile);
}
把内容记录在日志中,进行测试~