-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path3p-base.php
47 lines (31 loc) · 1.51 KB
/
3p-base.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
39
40
41
42
43
44
45
46
47
<?php
// 3p-Base
#error_reporting(E_ERROR | E_WARNING | E_PARSE);
#error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
error_reporting(0);
# ob_start();
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start('ob_gzhandler'); else ob_start();
if(!defined('p3')){ die("Access Denied!"); }
# APPLICATION DIRECTORIES #
$baseGetCwd = basename(getcwd());
if($_SERVER['HTTP_HOST']=='localhost')
$base_url = 'http://'.$_SERVER['HTTP_HOST'].'/'.$baseGetCwd.'/';
else
$base_url = 'http://'.$_SERVER['HTTP_HOST'].'/'; # LIVE SERVER
# BASE_URL Variable
require_once 'definer.php';
$ArrayUserModel = array(__MAIN__.'mainController.php',__SESSION__.'sessionController.php',__COOKIE__.'cookieController.php',__FILEMANAGER__.'filemanagerController.php',__PUBLIC__.'publicController.php'); # PHP 5
foreach($ArrayUserModel as $fileName){
if(is_dir(__SESSION__) && file_exists($fileName)){ require_once $fileName;} # PHP 5 Logic
}
if(file_exists(__CONFIG__.'routes.php')) require_once __CONFIG__.'routes.php';
$setting = $system.'setting/';
# BEGIN SYSTEM DIRECTORIES #
# The Common Setting File should be alignable { Error, Action, Model, Controller }
$ArraySetting = array($setting.'settingError.php',$setting.'settingAction.php',$setting.'settingModel.php',$setting.'settingController.php');
# The Common Setting File should be alignable { Error, Action, Model, Controller }
foreach($ArraySetting as $fileName){
if(is_dir($setting) && file_exists($fileName)){ require_once $fileName; }
}
# END SYSTEM DIRECTORIES #
?>