Ninjakreborn Posted November 7, 2010 Share Posted November 7, 2010 I have been getting a lot more client requests to protect files. What is the easiest way to do this. So, basically I have tried doing it outside the public directory. There are too many things that cause issues with this. I haven't been able to get a successfull implementation of this since I started working with this. So I was thinking instead about password protecting a directory that is inside public view, but still get files via PHP. Is there a way to setup a password protected directory, then retreive stuff from that directory using PHP. Or, a good way to put them outside the public folder. Everything I have tried to do to get a file to save outside of public view, has not worked. It always says uploaded but the file is never there. Also, I have verified correct permission for this as well. Quote Link to comment https://forums.phpfreaks.com/topic/218031-root-protection/ Share on other sites More sharing options...
jcbones Posted November 7, 2010 Share Posted November 7, 2010 Instead of password protecting the directory, just deny it to everyone. No password request will be sent, it will just deny access. Being that PHP is the server, it can still access those files with includes. [.htaccess] order deny, allow deny from all Quote Link to comment https://forums.phpfreaks.com/topic/218031-root-protection/#findComment-1131462 Share on other sites More sharing options...
Ninjakreborn Posted November 7, 2010 Author Share Posted November 7, 2010 Nice solution. I like that. I will try it out and see how it goes. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/218031-root-protection/#findComment-1131468 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.