作者 刘锟

update

@@ -433,8 +433,16 @@ class ProjectUpdate extends Command @@ -433,8 +433,16 @@ class ProjectUpdate extends Command
433 //获取地址路由 433 //获取地址路由
434 protected function get_url_route($url) 434 protected function get_url_route($url)
435 { 435 {
436 - $arr = explode('/', $url);  
437 - return $arr[count($arr) - 2]; 436 + $arr = parse_url($url);
  437 + $path = $arr['path'];
  438 +
  439 + if (strpos($path, '.') !== false) {
  440 + $path = substr($path, 0, strpos($path, '.'));
  441 + }
  442 +
  443 + $path_arr = explode('/', $path);
  444 +
  445 + return end($path_arr) ? end($path_arr) : $path_arr[count($path_arr) - 2];
438 } 446 }
439 447
440 //多级分类入库 448 //多级分类入库