I'm working on an Ajax Search plugin. As of right now I have search.php file which I'm uploading to the root level of the server. In order for the plugin to work, I need to connect to the database therefore I'm adding the settings for sever, user, database name and database password from configure.php.
Thus far it works either of the following two ways
I just add:
or add :PHP Code:include('includes/configure.php');
The ideal would be to use the first example since there would be no need to modify the file but regardless, I'm concerned about exposing any settings that could compromise the safety of the website.PHP Code:define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'root');
define('DB_SERVER_PASSWORD', 'root');
define('DB_DATABASE', 'database');
How can I make this file safe from intrusion other than just setting the permissions to read only?
Is either of these examples above safer than the other?
Thanks for any advice.


Reply With Quote

