Heim >Backend-Entwicklung >PHP-Tutorial >Typecho中的路由规则,用 | (或运算符) 做正则的定界符问题
<code>array(6) { ["url"] => string(1) "/" ["widget"] => string(14) "Widget_Archive" ["action"] => string(6) "render" ["regx"] => string(8) "|^[/]?$|" ["format"] => string(1) "/" ["params"] => array(0) { } }</code>
regx中的值是用|斜杠做定界符,不是用/或#吗?preg_match()函数
<code>array(6) { ["url"] => string(1) "/" ["widget"] => string(14) "Widget_Archive" ["action"] => string(6) "render" ["regx"] => string(8) "|^[/]?$|" ["format"] => string(1) "/" ["params"] => array(0) { } }</code>
regx中的值是用|斜杠做定界符,不是用/或#吗?preg_match()函数
题目取的不好,自己看手册吧 http://php.net/manual/zh/regexp.reference.delimiters.php