PHP可以读取服务器HTTP日志吗? [英] Can PHP read server HTTP logs?
本文介绍了PHP可以读取服务器HTTP日志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想轻松地访问服务器的日志,以某种方式解释它们并将这些数据显示给网站访问者.PHP如何访问服务器的HTTP日志及其中的所有数据?
I'd like to easily access the logs of a server to interpret them in a way and display that data to a website visitor. How can PHP access the HTTP logs of a server and all data therein?
推荐答案
最简单的方法:创建从/var/log/apache2/{acces,error,...}.log到可读目录的符号链接,例如:/var/www
Easiest way: create a symbolic link from /var/log/apache2/{acces,error,...}.log to a readable dir, e.g: /var/www
这篇关于PHP可以读取服务器HTTP日志吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文