Home  >  Article  >  php教程  >  thinkphp3.2.3版本模板引擎会把反斜杠过滤掉的解决办法,thinkphp3.2.3斜杠

thinkphp3.2.3版本模板引擎会把反斜杠过滤掉的解决办法,thinkphp3.2.3斜杠

WBOY
WBOYOriginal
2016-06-13 08:43:041078browse

thinkphp3.2.3版本模板引擎会把反斜杠\过滤掉的解决办法,thinkphp3.2.3斜杠

   这个问题让我纠结了几个小时,刚开始还以为是JS有问题,一直排查排查,,最后发现,是thinkphp3.2.3把JS正则的反斜杠\过滤掉了,导致JS正则失效,比如\d{4},解析出来变成了d{4}

 

  解决办法是可以用两个反斜杠\\,比如\d{4}写成 \\d{4}即可

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn