Blogger Information
Blog 10
fans 1
comment 0
visits 12562
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP文件写日志操作
GrMax的博客
Original
1096 people have browsed it
function logResult($str='') { 
    $fp = fopen("log.txt","a"); 
    flock($fp, LOCK_EX) ; 
    fwrite($fp,"执行日期:".strftime("%Y%m%d%H%M%S",time())."\n".$str."\n"); 
    flock($fp, LOCK_UN); 
    fclose($fp); 
} 
//调用
logResult('获取数据reselt=xxx');


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post