我有一个centos7,我已经安装了httpd和mysqld。
我想访问 apache 登录 /var/httpd/log
和:
echo file_get_contents("/var/log/httpd/domains/example.com.log");
但它不起作用。
最佳答案
似乎您的代码是 PHP 语法,对吗?
而file_get_contents();
只能获取下的文件网络根在相对链接或 URI 中。
关于php - 如何访问apache日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48247542/