diff --git a/conf/app.ini b/conf/app.ini index 6dab843..55f1043 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -1,5 +1,5 @@ [common];公用配置 -version = 2.4.2 +version = 2.4.3 application.directory = APP_PATH "/app/" application.library = APP_PATH "/library" application.num_param = 'id' ;id形默认绑定参数 如 /User/123 =>绑定参数$id值未123 @@ -53,7 +53,7 @@ cors.Access-Control-Max-Age = 3628800 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [dev:common];本地(开发调试)配置 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -application.bootstrap = APP_PATH "/app/Bootstrap.dev.php" +application.bootstrap = APP_PATH "/library/Bootstrap/dev.php" application.system.cache_config = 0 ;特殊配置path @@ -79,6 +79,7 @@ log.mode = '0777';文件权限,仅对开发环境设置有效 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [product:common];线上(生产环境)配置 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;application.bootstrap = APP_PATH "/library/Bootstrap/product.php" application.dispatcher.throwException = 1 application.dispatcher.catchException = 1 application.system.cache_config = 1 diff --git a/app/Bootstrap.dev.php b/library/Bootstrap/dev.php similarity index 97% rename from app/Bootstrap.dev.php rename to library/Bootstrap/dev.php index f634904..729fe1e 100644 --- a/app/Bootstrap.dev.php +++ b/library/Bootstrap/dev.php @@ -1,5 +1,6 @@ bootstrap()->run(); -?> \ No newline at end of file + +if ($app->getConfig()->application->bootstrap) { + $app->bootstrap();//加载启动项 +} +$app->run(); \ No newline at end of file diff --git a/tests/init.php b/tests/init.php index 5b67c2a..19878c7 100644 --- a/tests/init.php +++ b/tests/init.php @@ -3,4 +3,7 @@ define('TRACER_OFF', true); $app=new Yaf_Application(APP_PATH . '/conf/app.ini'); -$app->bootstrap(); +if ($app->getConfig()->application->bootstrap) { + $app->bootstrap();//加载启动项 +} +