diff --git a/convention.php b/convention.php index 26582c24..52edf744 100644 --- a/convention.php +++ b/convention.php @@ -115,7 +115,7 @@ return [ // | 模板设置 // +---------------------------------------------------------------------- - 'template' => [ + 'template' => [ // 模板引擎类型 支持 php think 支持扩展 'type' => 'Think', // 视图基础目录,配置目录为所有模块的视图起始目录 @@ -137,32 +137,32 @@ return [ ], // 视图输出字符串内容替换 - 'view_replace_str' => [], + 'view_replace_str' => [], // 默认跳转页面对应的模板文件 - 'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', - 'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', + 'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', + 'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', // +---------------------------------------------------------------------- // | 异常及错误设置 // +---------------------------------------------------------------------- // 异常页面的模板文件 - 'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl', + 'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl', // 错误显示信息,非调试模式有效 - 'error_message' => '页面错误!请稍后再试~', + 'error_message' => '页面错误!请稍后再试~', // 显示错误信息 - 'show_error_msg' => false, + 'show_error_msg' => false, // 异常处理handle类 留空使用 \think\exception\Handle - 'exception_handle' => '', + 'exception_handle' => '', // 是否记录trace信息到日志 - 'record_trace' => false, + 'record_trace' => false, // +---------------------------------------------------------------------- // | 日志设置 // +---------------------------------------------------------------------- - 'log' => [ + 'log' => [ // 日志记录方式,内置 file socket 支持扩展 'type' => 'File', // 日志保存目录 @@ -174,7 +174,7 @@ return [ // +---------------------------------------------------------------------- // | Trace设置 开启 app_trace 后 有效 // +---------------------------------------------------------------------- - 'trace' => [ + 'trace' => [ // 内置Html Console 支持扩展 'type' => 'Html', ], @@ -183,7 +183,7 @@ return [ // | 缓存设置 // +---------------------------------------------------------------------- - 'cache' => [ + 'cache' => [ // 驱动方式 'type' => 'File', // 缓存保存目录 @@ -198,7 +198,7 @@ return [ // | 会话设置 // +---------------------------------------------------------------------- - 'session' => [ + 'session' => [ 'id' => '', // SESSION_ID的提交变量,解决flash上传跨域 'var_session_id' => '', @@ -215,7 +215,7 @@ return [ // +---------------------------------------------------------------------- // | Cookie设置 // +---------------------------------------------------------------------- - 'cookie' => [ + 'cookie' => [ // cookie 名称前缀 'prefix' => '', // cookie 保存时间 @@ -236,7 +236,7 @@ return [ // | 数据库设置 // +---------------------------------------------------------------------- - 'database' => [ + 'database' => [ // 数据库类型 'type' => 'mysql', // 数据库连接DSN配置 @@ -280,17 +280,17 @@ return [ ], //分页配置 - 'paginate' => [ + 'paginate' => [ 'type' => 'bootstrap', 'var_page' => 'page', 'list_rows' => 15, ], //控制台配置 - 'console' => [ + 'console' => [ 'name' => 'Think Console', 'version' => '0.1', - 'user' => null - ] + 'user' => null, + ], ]; diff --git a/library/think/Url.php b/library/think/Url.php index 2b5fd7f7..53a545f9 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -302,7 +302,7 @@ class Url foreach ($rule as $item) { list($url, $pattern, $domain, $suffix) = $item; if (empty($pattern)) { - return [$url, $domain, $suffix]; + return [rtrim($url, '$'), $domain, $suffix]; } $type = Config::get('url_common_param'); foreach ($pattern as $key => $val) {