brianjw Posted August 17, 2008 Share Posted August 17, 2008 Many apologies if this is the wrong place to post this! I am not sure but is it possible to make like a page where you can add bans to the .htaccess without FTP and editing the file. Just a little page that will direct it to .htaccess? I am thinking out loud here so bare with me. Let me know. If not php, maybe other languages? Quote Link to comment https://forums.phpfreaks.com/topic/120029-is-this-possible-coding-htaccess-with-php/ Share on other sites More sharing options...
ratcateme Posted August 17, 2008 Share Posted August 17, 2008 no you should be able to do it in php just make sure the file prems are right look at fopen() fwrite() Scott. Quote Link to comment https://forums.phpfreaks.com/topic/120029-is-this-possible-coding-htaccess-with-php/#findComment-618341 Share on other sites More sharing options...
cooldude832 Posted August 17, 2008 Share Posted August 17, 2008 yes I just wrote this into my cms like 5 minutes ago lol The thing you can not do (at least I think) is have a php file actually dynamically run the .htaccess file. Meaning pull it from a database and ehco it out on each page request. But realistically you can use file handlers as stated above to open the .htaccess file and then use fwrite to save the changes. Quote Link to comment https://forums.phpfreaks.com/topic/120029-is-this-possible-coding-htaccess-with-php/#findComment-618346 Share on other sites More sharing options...
RichardRotterdam Posted August 17, 2008 Share Posted August 17, 2008 I havent even thought about that. I think I'm gonna use this too Quote Link to comment https://forums.phpfreaks.com/topic/120029-is-this-possible-coding-htaccess-with-php/#findComment-618416 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.