nick02895 Posted July 20, 2008 Share Posted July 20, 2008 I have a site that I use php and mysql to verify users. It's all working pretty good except the files are accessible via the internet just by knowing the file name. I was using htaccess and all the users had the same username and password, but now I want everyone to have their own. Question, how do I access the htaccess password directory with php. I suspect I need to use a session variable, but can't understand how that get's done. Nick nick1@nickniquette.com Quote Link to comment https://forums.phpfreaks.com/topic/115736-htaccess-with-php/ Share on other sites More sharing options...
trq Posted July 20, 2008 Share Posted July 20, 2008 This should get you started. Quote Link to comment https://forums.phpfreaks.com/topic/115736-htaccess-with-php/#findComment-595010 Share on other sites More sharing options...
nick02895 Posted July 21, 2008 Author Share Posted July 21, 2008 What I understand there is the htaccess variables can be used in my php scripts. I've tried reversing that and setting the variables myself in the scripts. $_SERVER["PHP_AUTH_USER"] = "user"; $_SERVER["PHP_AUTH_PW"] = "pswd" ; $PHP_AUTH_USER = "user"; $PHP_AUTH_PW = "pswd" ; but I still get the popup box. Can I avoid that box and set the variables myself in my php scripts? Quote Link to comment https://forums.phpfreaks.com/topic/115736-htaccess-with-php/#findComment-595110 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.