diff --git a/.gitignore b/.gitignore index 93e6541..8b13789 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -local-config.php + diff --git a/config.php b/config.php index 9fae02a..430f2ad 100644 --- a/config.php +++ b/config.php @@ -6,7 +6,10 @@ define('DB_USERNAME', 'bruno'); define('DB_PASSWORD', 'bruno-zehn'); define('DB_NAME', 'phptest'); -require_once("./local-config.php"); +define ('myLocalConf','./local-config.php'); + +if (is_file(myLocalConf)) { + require_once(myLocalConf); } /* Attempt to connect to MySQL database */ $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); diff --git a/local-config.php b/local-config.php new file mode 100644 index 0000000..37ebbcd --- /dev/null +++ b/local-config.php @@ -0,0 +1,8 @@ + \ No newline at end of file