Home > Backend Development > PHP Tutorial > 关于 文本中 包孕 xml 结构

关于 文本中 包孕 xml 结构

WBOY
Release: 2016-06-13 10:57:00
Original
795 people have browsed it

关于 文本中 包含 xml 结构
$html = 'HTTP/1.1 200 OK Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Mon, 22 Oct 2012 07:38:15 GMT Connection: close Content-Length: 315 0 11022153815002472 提交成功 0 ';

如上..怎么把 $html 中的 字符串 和 xml 分离出来呢?~~~

用的是 php 语言

求大仙..拯救~~~

------解决方案--------------------

PHP code
preg_match('//is',$html,$match);print_r($match[0]);<br><font color="#e78608">------解决方案--------------------</font><br>echo strstr($html,'<?xml ');<br /><br>你这是抓取的吧,你把头信息去掉不就不用区分了。<div class="clear">
                 
              
              
        
            </div>
Copy after login
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