我的IP Logger需要帮助

I need help with my IP logger.

at my index.php file, I use this code:

----> $line = date('Y-m-d H:i:s') . " - $_SERVER[REMOTE_ADDR]"; file_put_contents('cpanel/iphenter.log', $line . PHP_EOL, FILE_APPEND);

And in my cpanel directory, I have a home.php file. In this home.php file I use the following code to implement the .log file in a DIV:

---> include 'iphenter.log' ;

At this point, everything works. But, every IP mashes 'crashes' together(Not sure how to explain this properly).

So, here is my question: How do I make a IP go on their own line. doesnt work in a PHP code, so how do I make it 'press enter' after every log?

I hope you understood my issue. Thanks!

 $line = date('Y-m-d H:i:s', strtotime("+2 hours")) . " - " . $_SERVER['REMOTE_ADDR']."<br \>";

Is the output generated to HTML or a text file? If it is a text file, you can try:

 $line = date('Y-m-d H:i:s' , strtotime("+2 hours") ) . " - " $_SERVER['REMOTE_ADDR']."
";