作者 lyh

gx

@@ -24,7 +24,7 @@ if (!function_exists('generateRoute')) { @@ -24,7 +24,7 @@ if (!function_exists('generateRoute')) {
24 function generateRoute($string) 24 function generateRoute($string)
25 { 25 {
26 //TODO::html结尾,htm结尾,只处理.htm前面的内容 26 //TODO::html结尾,htm结尾,只处理.htm前面的内容
27 - return trim(strtolower(preg_replace('/[\W.]+/', '-', trim($string))), '-'); 27 + return trim(strtolower(preg_replace('/[^\w.]+/', '-', trim($string))), '-');
28 } 28 }
29 } 29 }
30 30