[go: up one dir, main page]

Menu

[55c200]: / debug.php  Maximize  Restore  History

Download this file

70 lines (52 with data), 1.5 kB

 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* Nwicode
*
* @version 4.12.18
* @author Nwicode SAS <dev@nwicode.com>
*/
global $_config;
if(!file_exists('./config.php')) {
copy('./config.sample.php', './config.php');
}
require_once './config.php';
// Php Info!
if (($_config['environment'] === 'development') && isset($_GET['phpi'])) {
phpinfo();
die;
}
set_time_limit(300);
ini_set('max_execution_time', 300);
umask(0);
setlocale(LC_MONETARY, 'en_US');
defined('DS')
|| define('DS', DIRECTORY_SEPARATOR);
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/app'));
// Defining ENV globally!
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', $_config['environment']);
// Sourcing default libs!
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../lib'),
)));
require_once 'Zend/Application.php';
// Initializing the application!
$ini = is_readable(APPLICATION_PATH . '/configs/app.ini') ?
APPLICATION_PATH . '/configs/app.ini' : APPLICATION_PATH . '/configs/app.sample.ini';
$application = new Zend_Application(
$_config['environment'],
[
'config' => [
$ini,
APPLICATION_PATH . '/configs/resources.cachemanager.ini',
],
]
);
$config = new Zend_Config($application->getOptions(), true);
Zend_Registry::set('config', $config);
Zend_Registry::set('_config', $_config);
session_cache_limiter(false);
/** Running */
$application->bootstrap();
Nwicode_Debug::handle();