simoa
asked on
Breaking line in .htaccess
Hello,
how can I break the link with this code? I tried to include \n but it doesn't work. The code will write to .htaccess file.
<?
$ip = "deny from $REMOTE_ADDR\n" ;
$banip = '.htaccess';
$fp = fopen($banip, "a");
$write = fputs($fp, $ip);
fclose($fp)
?>
.htaccess file output, it cannot break the line in between "deny from 123.122.8.10"
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 123.122.8.10deny from 456.122.8.10deny from 696.122.8.10
thank you
how can I break the link with this code? I tried to include \n but it doesn't work. The code will write to .htaccess file.
<?
$ip = "deny from $REMOTE_ADDR\n" ;
$banip = '.htaccess';
$fp = fopen($banip, "a");
$write = fputs($fp, $ip);
fclose($fp)
?>
.htaccess file output, it cannot break the line in between "deny from 123.122.8.10"
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 123.122.8.10deny from 456.122.8.10deny from 696.122.8.10
thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hernst42: sorry your couldn't work thanks for helping.
TeRReF: thanks it works.
TeRReF: thanks it works.
You're welcome.
$ip = "\ndeny from $REMOTE_ADDR";
in this case