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(); //关闭日志
/*
该代码无输出内容
*/
//
文章链接:http://www.phprm.com/function/36603.html
随便收藏,请保留本文地址!