php代码
public function check_url(){ //解析url //获取所有的参数 if($_SERVER['QUERY_STRING']==''){ $url = 'action=admin&job=login'; // 'action=user&job=create_list&type&id' }else{ $url = $_SERVER['QUERY_STRING']; } $url = str_replace('action=', '', $url ) ; $url = str_replace('job=', '', $url ) ; $opt = explode('&' , $url); return $opt[0].'_'.$opt[1] ; //返回权限 }