How can I parse Apache's error log in PHP?

后端 未结 6 1654
刺人心
刺人心 2021-01-04 00:38

I want to create a script that parses or makes sense of apache\'s error log to see what the most recent error was. I was wondering if anyone out there has something that doe

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 01:21

    there are piles of php scripts that do this, just do a google search for examples. if you want to roll your own, it's nothing more complex than reading any other file. just make sure you know the location of your logfiles (defined in the httpd.conf file) and the format your log files are in. the format is also defined in httpd.conf

提交回复
热议问题