Page 1 of 1
Password on php file?
Posted: Thu Oct 17, 2002 12:04 pm
by mettlehead
I have a file that no one really knows tha address but incase someone stumbles on it, I'd like to place a password on it. My question is can you have the user enter a password and just check it in the code? Or is it possible for someone to access the php code and find out. I just need a quick simple way.
Posted: Thu Oct 17, 2002 2:52 pm
by volka
php code should not be revealed as long as your webserver is configured properly (that is: it handles php code as script)
using this search
http://www.google.de/search?sourceid=navclient&hl=de&q=%2Ehtaccess the first two matches were
Posted: Thu Oct 17, 2002 4:11 pm
by rev
If you must *sigh* put a password in a clear text file, I suggest that you do not place the text file in your web root, rather put it outside of the web root. Thus, using another script include the file with the password string.
This is by no means safe, but it's a bit more safe than having the actual file in your web root so a user could possibly browse it.