diff --git a/application/route.php b/application/route.php index 4ebbb9d..7bfbf1c 100644 --- a/application/route.php +++ b/application/route.php @@ -19,9 +19,10 @@ return [ 'new/:id' => [ //'News/read?status=1&app_id=5', 'News/read', - ['method' => 'get|post','ext' => 'shtml'], + ['method' => 'get|post', 'ext' => 'shtml'], ['id' => '\w+'], ], + 'hi' => 'index/index/hello', '__pattern__' => [ 'name' => '\w+', ], diff --git a/public/index.php b/public/index.php index 15b2527..d3c93cb 100644 --- a/public/index.php +++ b/public/index.php @@ -14,7 +14,10 @@ // 定义应用目录 define('APP_PATH', __DIR__ . '/../application/'); -//资源相对路径 +//资源相对路径 ...html资源路径与php文件路径不同,如: +//html localhost/think/public/favicon.ico +//php d:/www/think/public/extend.php +// 相对路径时两者通用,但是 php 许多函数引入文件必须使用全路径 eg;(file_get_contents()) define('RELATIVE_PATH', dirname($_SERVER["SCRIPT_NAME"])); // 加载框架引导文件 diff --git a/themes/blue/index_index.html b/themes/blue/index_index.html index 648578b..85a74b8 100644 --- a/themes/blue/index_index.html +++ b/themes/blue/index_index.html @@ -22,10 +22,10 @@