Re: Secure connection with MySQL database

From: Date: Sun, 18 Aug 2002 18:31:23 +0000
Subject: Re: Secure connection with MySQL database
Groups: php.general 
Request: Send a blank email to php-general+get-113147@lists.php.net to get a copy of this message
True. But I think you missed the point of the original question--there's no "non-web directory"... - E
To take it to another level, place the PHP file you are including in a non-web directory. That way, just in case the web server mucks up, there's no chance of PHP outputting the contents of the script, since the directory you place it in would not be readable by the web server. --- "Edwin @" <copperwalls@hotmail.com> wrote: Well, I'm not sure if this is what you're looking for but... if you name the file with a .php extension (instead of .txt or .inc) then your password is "protected". For example, you have a password declared like this: $my_db_username = 'MyUserName'; $my_db_password = 'MyPassWord'; And it's inside a file named "myfile.inc.php", then, even if somebody try to access the file using their browser like this: http://aaa.bbb.ccc/myfile.inc.php Nothing will appear... - E
How can I protect my username and password for my
connection
with a mysql server. I can't place a file outside
the root by the
provider I use. Thankx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com
_________________________________________________________________ 最新のファイナンス情報とライフプランのアドバイス MSN マネー http://money.msn.co.jp/

« previous php.general (#113147) next »