I am using php and mysql. I have a Database config file (db-config.php) which has my database name, username and password. My application and db config file store at: www(httpdocs)/app/db-config.php
Is that secure? Will others/hackers able to steal my file and get my database login information?
Or should i put it outside www folder, for example: db-config.php stores in www(httpdocs) same level folder. So in 1 of my app, I just do this:
include_once('../../db-config.php');
Will it works? I mean jump 2 level up to root/www/httpdocs folder??
Do you have any more secure way to store database password??