mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
增加APP_AUTO_RUN常量,入口文件定义true取代\think\App::run();懒出新高度:)
This commit is contained in:
1
base.php
1
base.php
@@ -42,6 +42,7 @@ defined('APP_HOOK') or define('APP_HOOK', false); // 是否开启HOOK
|
|||||||
defined('ENV_PREFIX') or define('ENV_PREFIX', 'T_'); // 环境变量的配置前缀
|
defined('ENV_PREFIX') or define('ENV_PREFIX', 'T_'); // 环境变量的配置前缀
|
||||||
defined('IS_API') or define('IS_API', false); // 是否API接口
|
defined('IS_API') or define('IS_API', false); // 是否API接口
|
||||||
defined('APP_AUTO_BUILD') or define('APP_AUTO_BUILD', false); // 是否自动生成应用模块
|
defined('APP_AUTO_BUILD') or define('APP_AUTO_BUILD', false); // 是否自动生成应用模块
|
||||||
|
defined('APP_AUTO_RUN') or define('APP_AUTO_RUN', false); // 是否自动运行
|
||||||
|
|
||||||
// 应用模式 默认为普通模式
|
// 应用模式 默认为普通模式
|
||||||
defined('APP_MODE') or define('APP_MODE', function_exists('saeAutoLoader') ? 'sae' : 'common');
|
defined('APP_MODE') or define('APP_MODE', function_exists('saeAutoLoader') ? 'sae' : 'common');
|
||||||
|
|||||||
@@ -46,3 +46,8 @@ if (APP_HOOK && isset($mode['tags'])) {
|
|||||||
if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) {
|
if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) {
|
||||||
Build::run(include APP_PATH . 'build.php');
|
Build::run(include APP_PATH . 'build.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 是否自动运行
|
||||||
|
if (APP_AUTO_RUN) {
|
||||||
|
App::run();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user