-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
38 lines (29 loc) · 717 Bytes
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Created by PhpStorm.
* User: MERT
* Date: 19/10/2017
* Time: 18:44
*/
$db_server="localhost";
$db_name="kalapp";
$db_user="root";
$db_pass="";
$db_charset="UTF8";
function __autoload($name){
$name=str_replace(array("\\"),array("/"),$name);
include 'include/'.$name.".php";
}
try{
$Class_Database=new PDO("mysql:host=" . $db_server .
";dbname=" . $db_name .
";charset=" . $db_charset . "",
$db_user,
$db_pass);
$Class_Database->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);
}catch(PDOException $e){
echo $e->getMessage();
exit;
}
$Auth_Config=new PHPAuth\Config($Class_Database);
$Auth=new PHPAuth\Auth($Class_Database,$Auth_Config);