<?xml version="1.0" eccoding="utf-8"?>
<phplamp>
<post>
<title id="1">php dfs fd </title>
<details> 详细内容 </details>
</post>
<post>
<title id="2">php dfs fd </title>
<details> 详细内容2 </details>
</post>
</phplamp> 第一行多个]
另外,请确定你的中文是utf-8
解决方案 »
- php的三联菜单
- 请教一个关于用何方法去访问一个程序页面
- 怎样读取所有在线人员的Cookies
- 用PHP做MIS系统,是不是明智??
- 如何取到文件中符合某一条件的数据个数
- Mysql主键自增长的问题
- 关于cookie保存和安全性的问题请教各位
- 请问在php中怎么去转换ASP中的chrB(AscB(varchar)在线等待.....谢谢各位
- 如何判断用户是否在线?
- 我想用PHP实现mail的发送,哪里有配置mail服务器的资料(w2k+apache+php)
- Fatal error: DB2 Error[[IBM][CLI Driver][DB2/NT] SQL0104N 在 "BEGIN-OF-STATEMENT" 后面找到异常标记 "describe
- PHPNow用于服务器环境的问题
<phplamp>
<post>
<title id="1">php dfs fd </title>
<details> 详细内容</details>
</post>
<post>
<title id="2">php dfs fd </title>
<details> 详细内容2</details>
</post>
</phplamp>在调试时能显示:
X-Powered-By: PHP/5.2.5
Set-Cookie: ZendDebuggerCookie=127.0.0.1%3A10137%3A0||084|77742D65|1019; path=/
Content-type: text/htmlstartId: 1<br />Title: php dfs fd <br />Details: 详细内容<br /><br />Id: 2<br />Title: php dfs fd <br />Details: 详细内容2<br /><br />end但在页面上知西显示:start
<?
$doc = new DOMDocument; //xml开始解析
$doc->load("me.xml");
$post = $doc->getElementsByTagName( "post");
echo $post->length;
foreach($post as $a){
// 获取Title标签Node
$title = $a->getElementsByTagName("title")->item(0)->nodeValue;
$details = $a->getElementsByTagName("details")->item(0)->nodeValue;
echo iconv("UTF-8","GB2312",$details);}?>
解析出来了啊