0

我当前的 php.ini 读取:error_log = error_log

很好,它将所有脚本的错误记录到单独的文件中,具体取决于它们所在的文件夹。所以它给出的结果如下:

public_html/error_log
public_html/folder1/error_log
public_html/folder2/error_log

但除此之外,是否也可以将其记录到一个通用的 error_log 中?像下面这样?

public_html/general_error_log_for_all_folders
public_html/error_log
public_html/folder1/error_log
public_html/folder2/error_log
4

1 回答 1

2
error_log = /absolute/path/to/error_log

如果您想为某些应用程序设置不同的错误日志,请使用运行时配置,例如 .htaccess

php_value error_log = /absolute/path/to/public_html/certain/app/error_log
于 2013-03-04T14:44:51.737 回答