From ca14916bbe05a3aee15533e258ded29ee020a476 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 28 Dec 2015 19:29:12 +0800 Subject: [PATCH] =?UTF-8?q?start=E8=B0=83=E6=95=B4=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=96=87=E4=BB=B6=E6=94=AF=E6=8C=81=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=20run=20=E9=87=8D=E6=96=B0=E5=AE=9A=E4=B9=89=E8=A6=81?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=9A=84=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BE=8B?= =?UTF-8?q?=E5=A6=82=EF=BC=9A=20'run'=3D>'\\think\cli::run'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/start.php b/start.php index a4570cb0..abe21422 100644 --- a/start.php +++ b/start.php @@ -46,10 +46,13 @@ if (APP_HOOK && isset($mode['tags'])) { if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) { Build::run(include APP_PATH . 'build.php'); } - -if (IN_UNIT_TEST) { - Loader::addNamespace('tests', TEST_PATH); +if (isset($mode['run'])) { + call_user_func($mode['run']); } else { - // 执行应用 - App::run(); + if (IN_UNIT_TEST) { + Loader::addNamespace('tests', TEST_PATH); + } else { + // 执行应用 + App::run(); + } }