-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.php
33 lines (27 loc) · 922 Bytes
/
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
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
// Define application environment
if(!defined('APPLICATION_ENV')) {
$value = trim(file_get_contents(dirname(__FILE__)."/servertype.txt"));
if($value=='') {
$value = 'development';
}
define('APPLICATION_ENV', $value);
}
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
realpath(APPLICATION_PATH . '/../library/Doctrine'),
get_include_path(),
)));
/** Zend_Application */
if(!@include_once( 'Zend/Application.php')) {
die("Can't find the Zend/ library files - did you unzip the file in /library ?");
}
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);