Typecho/Router/Parser.php中的parse方法里面的正則表達(dá)式是啥意思?附代碼:publicfunctionparse(){$result=array();foreach($this->_routingTableas$key=>$route){$this->_params=array();//在_routingTables,[regx]=>|^/attachment/([0-9]+)[/]?$|$route['regx']=preg_replace_callback("/%([^%]+)%/",array($this,'_match'),//[url]=>/attachment/[cid:digital]/preg_quote(str_replace(array('[',']',':'),array('%','%',''),$route['url'])));/**處理斜線*/$route['regx']=rtrim($route['regx'],'/');$route['regx']='|^'.$route['regx'].'[/]?$|';$route['format']=preg_replace("/\[([^\]]+)\]/","%s",$route['url']);$route['params']=$this->_params;$result[$key]=$route;}return$result;}
typecho的路由規(guī)則是啥?
翻翻過去那場雪
2019-04-07 11:18:19