I have learned php for about half a year, but there still a big problem, that is the security problem when I use php in a sharing hosting server.
If I want to connect to mySql with php, I have to save my password and also username in a file, no matter a stand alone .inc file or other method, the file with these important data MUST be readable by every on, that is chmod 666. So must password can be known by everyone who able to login the server, just like "true man show".
Someone suggest me to crypt my password, I don't know exactly how to do, but it also easy to break I believe. I can use many method, such as copy and paste, or directly link to the password containing file, and destory others' database.
That my question, how to protect my database from access by others? Thanks for your attention.