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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:06:19876browse

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

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

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