123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- define('ROOT_PATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
- define('BASE_DIR', ROOT_PATH . '/../');
- define('ENV_LOCAL', 'local');
- define('ENV_DEV', 'dev');
- define('ENV_FORMAL', 'form');
- define('ENV_NEW', 'new');
- $fileName = __FILE__;
- if (false) {
- define('FRAMEWORK_PATH', BASE_DIR . '../../framework/phpbase2/');
- } else if (strpos($fileName, '/data/webapps/') === 0 ) {
- if (strpos($fileName, '/test.') !== false || strpos($fileName, '/test-') !== false || strpos($fileName, '_test/') !== false) {
- define('CONF_PATH', '/data/webapps/conf_v2/test/');
- define('FRAMEWORK_PATH', '/data/webapps/framework/phpbase2_test/');
- $env = ENV_DEV;
- } elseif (strpos($fileName, '/new.') !== false || strpos($fileName, '/new-') !== false || strpos($fileName, '_new/') !== false) {
- define('CONF_PATH', '/data/webapps/conf_v2/new/');
- define('FRAMEWORK_PATH', '/data/webapps/framework/phpbase2_new/');
- $env = ENV_NEW;
- } else {
- define('CONF_PATH', '/data/webapps/conf_v2/form/');
- define('FRAMEWORK_PATH', '/data/webapps/framework/phpbase2/');
- $env = ENV_FORMAL;
- }
- } else if (strpos($fileName, '/data_dev/') === 0 ) {
-
- define('CONF_PATH', '/data/webapps/conf_v2/test/');
- $local = BASE_DIR . '../../framework/phpbase2/';
- if (file_exists($local)) {
- define('FRAMEWORK_PATH', $local);
- } else {
- define('FRAMEWORK_PATH', '/data/webapps/framework/phpbase2_test/');
- }
-
- $env = ENV_DEV;
- } else {
-
- define('FRAMEWORK_PATH', BASE_DIR . '../../php_new/trunk/framework/phpbase2/');
- define('CONF_PATH', '/data/webapps/conf_v2/test/');
- define('IS_ENV_LOCAL', true);
- $env = ENV_DEV;
- }
- require_once FRAMEWORK_PATH . 'protected/common.php';
- require_once __DIR__ . '/vendor/autoload.php';
|