正则去掉< ?>标签里的文字,该怎么处理

WBOY
Release: 2016-06-13 12:53:52
Original
1017 people have browsed it

正则去掉 ?>标签里的文字
curl解析某网站时,遇到一个BT的问题:某网站一段php代码由于没有使用完整的  被当做html源码给解析出来了。如何用正则去掉这段php标签里的文字?谢谢。

<div id="content"><br />
    some words<br />
</div><br />
<?	<br />
	$box_social['dimensioni']="80";<br />
        $box_vota=array();<br />
	$box_vota["novideo"]='';<br />
	$box_vota["nofoto"]='';<br />
	$box_vota["id_articolo"]='1003691';<br />
	include($_SERVER['DOCUMENT_ROOT']."/incs/box_social.php");	<br />
?><br />
<div id="footer"><br />
   some words<br />
</div>
Copy after login


------解决方案--------------------
preg_replace('//','',$html);
------解决方案--------------------
 '//msi'
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!