From 1a7d3d6d625bfc097455c95816712bf46efe8035 Mon Sep 17 00:00:00 2001 From: topnuomi <1130395124@qq.com> Date: Wed, 19 Jun 2019 14:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E8=A7=86=E5=9B=BE=E9=A9=B1=E5=8A=A8=E6=B3=A8?= =?UTF-8?q?=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/home/config/config.php | 2 +- public/index.php | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/application/home/config/config.php b/application/home/config/config.php index b03a47b..58ae201 100644 --- a/application/home/config/config.php +++ b/application/home/config/config.php @@ -1,7 +1,7 @@ [ - 'Twig' => top\library\template\Twig::class, + 'Twig' => \top\library\template\driver\Twig::class, // 'Smarty' => top\library\template\Smarty::class, // 'Top' => top\library\template\Top::class, ], diff --git a/public/index.php b/public/index.php index 8b3fe67..a17a920 100644 --- a/public/index.php +++ b/public/index.php @@ -4,5 +4,29 @@ use \top\Framework; require '../framework/Framework.php'; +// 可能你会使用到下面这些配置 + +// 调试模式,缺省值:false +// Framework::debug(true); +// 可使用常量DEBUG取得该值 + +// 项目目录,缺省值:./application/ +// Framework::appPath('../application/'); +// 可使用常量APP_PATH取得该值 + +// 项目命名空间,缺省值:app +// Framework::appNameSpace('app'); +// 可使用常量APP_NS取得该值 + +// 框架目录,缺省值:Framework.php的绝对路径 +// Framework::frameworkPath('../framework'); +// 可使用常量FRAMEWORK_PATH取得该值 + +// 静态资源目录,缺省值:/resource/ +// Framework::resourcePath('/resource/'); +// 可使用常量RESOURCE取得该值 + Framework::appPath('../application/'); + +// 执行程序 Framework::startApp();