警告:preg_match [英] Warning: preg_match
本文介绍了警告:preg_match的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
警告:preg_match() [function.preg-match]:编译失败:偏移量 3 处的不匹配括号/home/watchit/public_html/wp-includes/class-wp.php 第 201 行
Warning: preg_match() [function.preg-match]: Compilation failed: unmatched parentheses at offset 3 in /home/watchit/public_html/wp-includes/class-wp.php on line 201
为此:
if ( preg_match("#^$match#", $request_match, $matches) ||
改成这样:
if ( preg_match("#^$match#", $request_match, $matches)) ||
得到这个:
解析错误:语法错误,意外的 T_BOOLEAN_OR in/home/watchit/public_html/wp-includes/class-wp.php 第 201 行
Parse error: syntax error, unexpected T_BOOLEAN_OR in /home/watchit/public_html/wp-includes/class-wp.php on line 201
推荐答案
if ( preg_match("#^".preg_quote($match,'#'),"#", $request_match, $matches) ||
注意我在 ||
之前删除了额外的 )
Note also I removed the extra )
before ||
这篇关于警告:preg_match的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文