作者 lyh

gx

@@ -23,6 +23,9 @@ define('HTTP_OPENAI_URL', 'http://openai.waimaoq.com/'); @@ -23,6 +23,9 @@ define('HTTP_OPENAI_URL', 'http://openai.waimaoq.com/');
23 if (!function_exists('generateRoute')) { 23 if (!function_exists('generateRoute')) {
24 function generateRoute($string) 24 function generateRoute($string)
25 { 25 {
  26 + if(is_array($string)){
  27 + $string = $string[0];
  28 + }
26 return str_replace(".", "", trim(strtolower(preg_replace('/[^\w.]+/', '-', trim($string))), '-')); 29 return str_replace(".", "", trim(strtolower(preg_replace('/[^\w.]+/', '-', trim($string))), '-'));
27 } 30 }
28 } 31 }