路由条件 ext 支持多个后缀验证

This commit is contained in:
thinkphp
2016-01-09 20:38:11 +08:00
parent 01222e8db2
commit 25f31081e8

View File

@@ -405,7 +405,7 @@ class Route
{
// 请求类型检测
if ((isset($option['method']) && false === stripos($option['method'], REQUEST_METHOD))
|| (isset($option['ext']) && __EXT__ != $option['ext']) // 伪静态后缀检测
|| (isset($option['ext']) && false === stripos($option['ext'], __EXT__)) // 伪静态后缀检测
|| (isset($option['domain']) && $_SERVER['HTTP_HOST'] != $option['domain']) // 域名检测
|| (!empty($option['https']) && !self::isSsl()) // https检测
|| (!empty($option['behavior']) && false === Hook::exec($option['behavior'])) // 行为检测