| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- use lwmf\base\Config;
- //定义app id
- define('LWM_APP_ID', "api");
- //定义项目根目录
- define('LWM_PROJECT_PATH', dirname(dirname(__FILE__)));
- //YII框架路径
- define('YII_PATH', dirname(LWM_PROJECT_PATH) . '/yii/framework');
- // remove the following lines when in production mode
- defined('YII_DEBUG') or define('YII_DEBUG', true);
- // specify how many levels of call stack should be shown in each log message
- defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',5);
- defined('LEWAIMAI_DEBUG') or define('LEWAIMAI_DEBUG', true);
- require_once LWM_PROJECT_PATH .'/system/commons/Loader.php';
- // change the following paths if necessary
- //加载扩展后的YII框架
- require LWM_PROJECT_PATH . '/lwmf/Yii.php';
- //兼容旧的配置定义
- require LWM_PROJECT_PATH . '/protected/include/define/define.php';
- //初始化静态资源常量
- define('LWM_ASSETS_URL', Config::getInstance()->get('assetsUrl'));
- //初始化当前系统环境
- define('LWM_ENV', Config::getInstance()->get('env'));
- //获取默认配置
- $config = Config::getInstance()->get('', 'main');
- $app = Yii::createWebApplication($config);
- $app->run();
|