From b3ad62a329a64461468bb18d24b639e0064fd486 Mon Sep 17 00:00:00 2001 From: huangdijia Date: Mon, 25 Jan 2016 13:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0APP=5FAUTO=5FRUN=E5=B8=B8?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E5=85=A5=E5=8F=A3=E6=96=87=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E4=B9=89true=E5=8F=96=E4=BB=A3\think\App::run();=E6=87=92?= =?UTF-8?q?=E5=87=BA=E6=96=B0=E9=AB=98=E5=BA=A6=EF=BC=9A=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base.php | 1 + start.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/base.php b/base.php index cb3eb85e..adfcb364 100644 --- a/base.php +++ b/base.php @@ -42,6 +42,7 @@ defined('APP_HOOK') or define('APP_HOOK', false); // 是否开启HOOK defined('ENV_PREFIX') or define('ENV_PREFIX', 'T_'); // 环境变量的配置前缀 defined('IS_API') or define('IS_API', false); // 是否API接口 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'); diff --git a/start.php b/start.php index 16c973b6..653b428f 100644 --- a/start.php +++ b/start.php @@ -46,3 +46,8 @@ if (APP_HOOK && isset($mode['tags'])) { if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) { Build::run(include APP_PATH . 'build.php'); } + +// 是否自动运行 +if (APP_AUTO_RUN) { + App::run(); +} \ No newline at end of file