<?php
#write the error_log file which set by php.ini (search error_log)
error_log('asdf');
#write message to file
error_log('abc',3,'E:/xampp/apache/logs/asd');
#others
#send mail to admin
error_log("hi~~", 1, "admin@localhost.com ");
#sent to SAPI (CLI 模式下直接输出...)
error_log('asdf',4);
本文详细介绍了如何使用PHP的error_log()函数记录错误信息,并通过不同的参数配置将错误日志发送到指定文件或邮件地址,以及在CLI模式下直接输出错误信息的方法。
1119

被折叠的 条评论
为什么被折叠?



