Home > php教程 > php手册 > thinkphp3.2.3版本模板引擎会把反斜杠过滤掉的解决办法 - 二代旅游网站管理系统

thinkphp3.2.3版本模板引擎会把反斜杠过滤掉的解决办法 - 二代旅游网站管理系统

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-20 11:54:27
Original
1048 people have browsed it

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

 

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

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