From 7f877370163648460f6ffd8abb3ee9caa774441c Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 27 Jul 2016 23:52:00 +0200 Subject: Moved private information to conf.private.php --- conf.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'conf.php') diff --git a/conf.php b/conf.php index 82f79fb..837016c 100644 --- a/conf.php +++ b/conf.php @@ -31,21 +31,6 @@ session_start(); error_reporting(0); ini_set('display_errors', 0); -//------------------------------------------------------------------------------ -// Start editing below this line -//------------------------------------------------------------------------------ - -// Database settings (should be mysql) -$db_host = 'localhost'; -$db_name = 'my_database'; -$db_user = 'my_database_user'; -$db_pass = 'my_password'; -$db_port = '3306'; - -//------------------------------------------------------------------------------ -// Don't edit below this line -//------------------------------------------------------------------------------ - /** * Autoload a class if it isn't loaded yet * @@ -59,6 +44,8 @@ function __autoload($pClass) { set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)); +require_once('./conf.private.php'); + try { $_pdo = new PDO("mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8", $db_user, $db_pass); $_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -- cgit v1.2.3