Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 08:43:04
Original
1077 people have browsed it

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

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

 

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!