lalabored Posted May 6, 2007 Share Posted May 6, 2007 How do I write a new line into an .htaccess file? $fh = fopen($database."/.htaccess","w"); fwrite($fh,"Order Deny,Allow\nDeny from all"); fclose($fh); I used that, but it doesn't make a new line at \n. Quote Link to comment https://forums.phpfreaks.com/topic/50276-writing-into-htaccess/ Share on other sites More sharing options...
Guest prozente Posted May 7, 2007 Share Posted May 7, 2007 Look at the modes in the php manual: http://us.php.net/manual/en/function.fopen.php You'll want to use the append mode. Quote Link to comment https://forums.phpfreaks.com/topic/50276-writing-into-htaccess/#findComment-247149 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.