用php正则过滤程序标记开头到结尾全部过滤掉,请看说明,该怎么处理

WBOY
Release: 2016-06-13 10:06:19
Original
852 people have browsed it

用php正则过滤程序标记开头到结尾全部过滤掉,请看说明
用php正则过滤,比如: echo"ddfdf";?> 这段全部过滤掉,还有分别 等所有的带服务器端程序标记全部给过滤掉

------解决方案--------------------
preg_replace("##s", "", $str);
------解决方案--------------------
preg_replace("/()/gi","",$str);

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template