-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaseinit.php.sample
executable file
·52 lines (42 loc) · 1.59 KB
/
baseinit.php.sample
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
<?php
// define these global path constants here
define( 'KUTU_ROOT_DIR', dirname(__FILE__));
define( 'ROOT_PATH' , dirname( __FILE__ ) ) ;
define( 'LIB_PATH' , ROOT_PATH . '/lib' ) ;
define( 'APPLICATION_PATH' , ROOT_PATH . '/application' ) ;
define( 'MODULE_PATH' , ROOT_PATH . '/application/modules' ) ;
// define the path for configuration file
define( 'CONFIG_PATH' , ROOT_PATH . '/application/configs' ) ;
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV',
(getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV')
: 'development'));
// set the php include path
set_include_path(
LIB_PATH . PATH_SEPARATOR .
get_include_path()
);
require_once('Kutu/Core/Util.php');
$KUTUUTIL = new Kutu_Core_Util();
$aPath = pathinfo(ROOT_PATH);
$kutuBaseName = $aPath['basename'];
if(!empty($kutuBaseName))
$kutuBaseName = '/'.$kutuBaseName;
//define('KUTU_ROOT_URL', $KUTUUTIL->getRootUrl()."/kutump");
define('KUTU_ROOT_URL', $KUTUUTIL->getRootUrl().$kutuBaseName);
define( 'KUTU_MODULE_RESOURCES_URL' , KUTU_ROOT_URL.'/common/modules' ) ;
/** Zend_Application */
define( 'ZEND_APP_REG_ID', 'application');
define('APPLICATION_CONFIG_FILENAME', 'application.ini');
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
CONFIG_PATH . '/'.APPLICATION_CONFIG_FILENAME
);
$registry = Zend_Registry::getInstance();
$registry->set(ZEND_APP_REG_ID, $application);
define('JCART_PATH_URL',KUTU_ROOT_URL."/lib/jcart/");
define('JCART_FORMACTION_URL',KUTU_ROOT_URL."/site/store/checkout");
?>