Is there a way to make a php script so that http://view_log.php wil display the content of a log file in /var/logs/something.log? Im running Apache and latest php.... asked 05 Mar '11, 12:17 ygdrazil |
Is there a way to do this? Yes. Many ways. The real question is: Why do you want to do this? then "How" to do it becomes the next question. Do you want to do this because you're coding something custom? OR do you just need the end result (which is to see the log details / filter them) ? If the second one, there are many existing programs and suites which already have this functionality to them, simply install one of them. answered 08 Mar '11, 17:27 Ron ♦ Well i have a documentation server and would like so see some logs on it by entering http://servernale/logname (would me nice to take latest file in dir also....
(11 Mar '11, 19:19)
ygdrazil
|
You could use the back tick notation
i.e.
$contents = // parse and format here echo $contents; answered 06 Mar '11, 19:36 Adam Pullen |