当前位置:编程学习 > php >>

php日志操作函数 closelog() define_syslog_variables()

php教程日志操作函数 closelog() define_syslog_variables()
*/
$result=closelog();       //关闭系统日志
if($result)
{
  echo "系统日志已经关闭";     //输出结果
}

//

define_syslog_variables();    //清空所有系统日志
echo "系统日志已经清空";    //输出结果

//

define_syslog_variables();         //清空所有系统日志
openlog("myscriptlog",log_pid|log_perror,log_user); //打开系统日志
$access=date("y/m/d h:i:s");        //获取日期
syslog(log_warning,"unauthorized client:$access $_server[remote_addr] ($_server[http_user_agent])");      //产生系统日志
closelog();            //关闭日志

//

define_syslog_variables();         //清空所有系统日志
openlog("myscriptlog",log_pid|log_perror,log_user); //打开系统日志
$access=date("y/m/d h:i:s");        //获取日期
syslog(log_warning,"unauthorized client:$access $_server[remote_addr] ($_server[http_user_agent])");      //产生系统日志
closelog();            //关闭日志
/*
该代码无输出内容
*/

//

补充:Php教程,Php函数 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,