Jump to content

Separate lines of log


frist44

Recommended Posts

I'm importing a syslog file into a page and just want to display the contents. I'm having trouble getting the line breaks to show breaks on the page.

 

This is what I have so far.

 

<?php
$filename = "file.log";
$fd = fopen ($filename, "r");
$contents = fread ($fd,filesize ($filename));
fclose ($fd);
echo $contents;
?>

 

What else do i need to add?

Link to comment
https://forums.phpfreaks.com/topic/145994-separate-lines-of-log/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.