Password on php file?
Moderator: General Moderators
-
mettlehead
- Forum Newbie
- Posts: 15
- Joined: Fri Oct 11, 2002 11:03 am
- Location: Canada
Password on php file?
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.
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
using this search http://www.google.de/search?sourceid=navclient&hl=de&q=%2Ehtaccess the first two matches were
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.
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.