mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Merge branch 'master' of https://github.com/liu21st/think
This commit is contained in:
@@ -58,6 +58,14 @@ return [
|
|||||||
'show_error_msg' => false,
|
'show_error_msg' => false,
|
||||||
//默认输出类型
|
//默认输出类型
|
||||||
'default_return_type' => 'html',
|
'default_return_type' => 'html',
|
||||||
|
//默认语言
|
||||||
|
'default_lang' => 'zh-cn',
|
||||||
|
//是否使用session
|
||||||
|
'use_session' => true,
|
||||||
|
//url地址的后缀
|
||||||
|
'url_deny_suffix' => '',
|
||||||
|
//是否必须使用路由
|
||||||
|
'url_route_must' => false,
|
||||||
|
|
||||||
'log' => [
|
'log' => [
|
||||||
'type' => 'File',
|
'type' => 'File',
|
||||||
@@ -112,7 +120,6 @@ return [
|
|||||||
],
|
],
|
||||||
/* SocketLog 调试 */
|
/* SocketLog 调试 */
|
||||||
'slog' => [
|
'slog' => [
|
||||||
'enable' => false, //是否记录日志的开关
|
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
//是否显示利于优化的参数,如果允许时间,消耗内存等
|
//是否显示利于优化的参数,如果允许时间,消耗内存等
|
||||||
'optimize' => true,
|
'optimize' => true,
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Slog
|
|||||||
|
|
||||||
protected static function check()
|
protected static function check()
|
||||||
{
|
{
|
||||||
if (!self::$config['enable']) {
|
if (!SLOG_ON) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$tabid = self::getClientArg('tabid');
|
$tabid = self::getClientArg('tabid');
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ class Lang
|
|||||||
self::$lang[$range] = [];
|
self::$lang[$range] = [];
|
||||||
}
|
}
|
||||||
// 批量定义
|
// 批量定义
|
||||||
|
if(!isset(self::$lang[$range])) {
|
||||||
|
self::$lang[$range] = [];
|
||||||
|
}
|
||||||
return self::$lang[$range] = array_merge(self::$lang[$range], array_change_key_case($lang));
|
return self::$lang[$range] = array_merge(self::$lang[$range], array_change_key_case($lang));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ class Route
|
|||||||
/**
|
/**
|
||||||
* 检查正则路由
|
* 检查正则路由
|
||||||
*/
|
*/
|
||||||
private function checkRegex($route, $url, $matches)
|
private static function checkRegex($route, $url, $matches)
|
||||||
{
|
{
|
||||||
// 正则路由
|
// 正则路由
|
||||||
if ($route instanceof \Closure) {
|
if ($route instanceof \Closure) {
|
||||||
@@ -341,7 +341,7 @@ class Route
|
|||||||
/**
|
/**
|
||||||
* 检查规则路由
|
* 检查规则路由
|
||||||
*/
|
*/
|
||||||
private function checkRule($rule, $route, $url, $pattern)
|
private static function checkRule($rule, $route, $url, $pattern)
|
||||||
{
|
{
|
||||||
$len1 = substr_count($url, '/');
|
$len1 = substr_count($url, '/');
|
||||||
$len2 = substr_count($rule, '/');
|
$len2 = substr_count($rule, '/');
|
||||||
|
|||||||
Reference in New Issue
Block a user