How can I have a password inside PHP code and guarantee that no one viewing the page in the browser can retrieve it?
Is:
The best way is to store password above your root directory. If you decide to have password in php file then no body would able to view because php files are excuted in the server. But if the server does not support php then those files will be delivered as text files and any one can see the password.