![]() |
My Password is Shown?!
I am new at web programming. I registered to a MySQL server. I have to use a code in my PHP file like this :
Code:
mysql_connect("DATABASEIP", "USERNAME", "PASSWORD") or die("Can't connect to database.");Is there any way to connect my database hiding my password? |
Re: My Password is Shown?!
Not actually. No one can download the PHP file unless he knows your FTP details or you allow anonymous FTP connections. So you should not allow the FTP and it will be safe as through the browser they try to fetch and it will be the final output you flushed through the HTML and nothing more.
|
Re: My Password is Shown?!
Just a minute ago I tried what you said and I realized that there was no PHP code in the downloaded file.
What is the reason we can't download a PHP file with all its contents? Is it impossible? And unfortunately, my web site is University supported and it allows anonymous FTP connections. |
Re: My Password is Shown?!
The actual reason is your when we make a request fro a PHP file through the explorer it send the request to the webserver for the same and as the request goes to your uni server it parses the php file and sends the output HTML as the output. You can ask for any file extension (HTML, JSP, ASP) to be parsed as PHP.
|
| All times are GMT +5.5. The time now is 23:44. |