凌的博客

您现在的位置是: 首页 > 学无止境 > PHP > 

PHP

php 记录日志

2022-03-24 PHP 952
function log_record($file,$msg){
	$fp = fopen($file,"a+");
	$e = fwrite($fp,$msg."\r\n");
	fclose($fp);
	return $e;
}

echo log_record('test.txt',date('Y-m-d H:i:s'));

self::log_record('test.txt',var_export($msg,1));


文章评论

0条评论