I've written a php script to log in users to my website. All attempts are written to a log.txt file.
I have an admin control page where all users details are displayed. I am attempting to get the log.txt page displayed here so I dont have to download the .txt file each time just to view it.
I have no problem displaying the log.txt page using the following code....
<?php
$fh = file_get_contents("login.txt");
echo "$fh";
?>
The log.txt file is written as an entry per line, but when I use the above script the admin page shows the results as a continious paragraph.
My question is how do I keep the formatting of the original log.txt page i.e a line per entry. I'm sure its something to do with using the aray function, but dont know how.
Please help.