-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
config.php
35 lines (30 loc) · 900 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
<?php
/**
* Config File For Handel Route, Database And Request
*
* Author: Mohammad Rahmani
* Email: [email protected]
* WebPage: afgprogrammer.com
*
*/
// Http Url
$scriptName = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
define('HTTP_URL', '/'. substr_replace(trim($_SERVER['REQUEST_URI'], '/'), '', 0, strlen($scriptName)));
// Define Path Application
define('SCRIPT', str_replace('\\', '/', rtrim(__DIR__, '/')) . '/');
define('SYSTEM', SCRIPT . 'System/');
define('CONTROLLERS', SCRIPT . 'Application/Controllers/');
define('MODELS', SCRIPT . 'Application/Models/');
define('UPLOAD', SCRIPT . 'Upload/');
// Config Database
define('DATABASE', [
'Port' => '3306',
'Host' => 'localhost',
'Driver' => 'PDO',
'Name' => 'simple-mvc',
'User' => 'root',
'Pass' => '',
'Prefix' => 'sm_'
]);
// DB_PREFIX
define('DB_PREFIX', 'sm_');