-
Notifications
You must be signed in to change notification settings - Fork 44
/
index.php
37 lines (28 loc) · 1005 Bytes
/
index.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
<?php
set_time_limit(120);
ini_set('max_execution_time', 120);
umask(0);
setlocale(LC_MONETARY, 'en_US');
//defined('BASE_PATH')
// || define('BASE_PATH', realpath(dirname(__FILE__)));
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/app'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure lib/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/modules'),
realpath(APPLICATION_PATH . '/../lib'),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application
$ini = file_exists(APPLICATION_PATH . '/configs/app.ini') ? APPLICATION_PATH . '/configs/app.ini' : APPLICATION_PATH . '/configs/app.sample.ini';
$application = new Zend_Application(
APPLICATION_ENV,
$ini
);
// Run
$application->bootstrap()->run();