【www.gdgbn.com--php函数】

*/
$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.gdgbn.com/jiaocheng/28437/