Jump to content

[SOLVED] \n line not working..?


Jadd

Recommended Posts

Hello users of phpfreaks!

 

I was just wondering why this code doesn't work:

<?php
$File = fopen("banned.dat", 'a+');
$IP = $_SERVER['REMOTE_ADDR'];
fwrite($File, $IP."\n");
fclose($File);
?>

 

It's a banning mechanism I use in a program I made, if anyone tries to decompile it, but for some reason when it writes to the 'banned.dat' file it appears as '123.456.78.901n' instead of making a new line entirely.

 

Any ideas?

 

Thanks,

Jadd.

Link to comment
https://forums.phpfreaks.com/topic/172091-solved-n-line-not-working/
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.