-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
36 lines (26 loc) · 972 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
<?php
// Route URL to controller and view
$routes = array(
array('url'=>'/^posts\/(?P<id>\d+)$/','controller'=>'posts','view'=>'show'),
array('url'=>'/^posts\/(?P<id>\d+)\/edit$/','controller'=>'posts','view'=>'edit'),
array('url'=>'/^posts\/new$/','controller'=>'posts','view'=>'new'),
array('url'=>'/^posts\/create$/','controller'=>'posts','view'=>'create')
);
// DATABSE Connection params
define('HOST','localhost');
define('USERNAME','root');
define('PASSWORD','');
define('DATABASE','thumblelog');
// Server ROOT
define('SERVER_ROOT',$_SERVER['DOCUMENT_ROOT']);
// Application Directory
define('APP_ROOT','learn-php/php-scratch');
// Directory Structure
define('DS','/');
// MVC Path
define('MODEL_PATH',SERVER_ROOT.DS.APP_ROOT.DS.'models'.DS);
define('CONTROLLER_PATH',SERVER_ROOT.DS.APP_ROOT.DS.'controller'.DS);
define('VIEW_PATH',SERVER_ROOT.DS.APP_ROOT.DS.'view'.DS);
// include libs
include('database.php');
?>