亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 6537 | 回復(fù): 5
打印 上一主題 下一主題

ASP,PHP給瀏覽器返回XML [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2005-03-22 01:50 |只看該作者 |倒序瀏覽
救急   

當(dāng)CLIENT使用POST請求TEST.ASP或者TEST.PHP時ASP,PHP直接給瀏覽器返回一個標(biāo)準(zhǔn)的XML的內(nèi)容

比如下面的回話過程。PHP或者ASP如何實現(xiàn)

客戶端發(fā)送的請求數(shù)據(jù)包:
POST /updates_ent/update.phtml HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel,

application/msword, application/x-shockwave-flash, */*
Content-Type: multipart/form-data; boundary=0a603b9e-312b-4657-a4e6-3e531f361f5d
User-Agent: qq
Host: www.test.com
Content-Length: 933
Connection: Keep-Alive
Pragma: no-cache

--0a603b9e-312b-4657-a4e6-3e531f361f5d
Content-Disposition: form-data; name="XMLFile"; filename="947130ed-cd8b-4a89-809b-3166ca900db0.xml"
Content-Type: text/xml

<?xml version="1.0"?>;
<FilesCatalog>;<MsgVersion>;1</MsgVersion>;<Solutions>;<Solution>;<SolutionID>;3</SolutionID>;<Files>;<File>;<Type>;16</Type>;<DateTime>;

2004-04-16 12:00:00</DateTime>;<NumPatches>;0</NumPatches>;</File>;<File>;<Type>;4</Type>;<DateTime>;2004-07-01

00:00:00</DateTime>;<NumPatches>;0</NumPatches>;</File>;<File>;<Type>;2</Type>;<DateTime>;2004-11-09

10:08:00</DateTime>;<NumPatches>;0</NumPatches>;</File>;<File>;<Type>;8</Type>;<DateTime>;2004-08-16

09:43:09</DateTime>;<NumPatches>;0</NumPatches>;</File>;<File>;<Type>;32</Type>;<DateTime>;2004-07-23

08:44:00</DateTime>;<NumPatches>;0</NumPatches>;</File>;<File>;<Type>;1</Type>;<DateTime>;2004-11-21

08:14:19</DateTime>;<NumPatches>;10</NumPatches>;</File>;</Files>;</Solution>;</Solutions>;</FilesCatalog>;
--0a603b9e-312b-4657-a4e6-3e531f361f5d--

服務(wù)器返回的數(shù)據(jù)包:
HTTP/1.1 200 OK
Date: Mon, 14 Mar 2005 00:04:51 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html

<?xml version="1.0"?>;<FilesCatalog>;<MsgVersion>;1</MsgVersion>;<ServerDateTime>;2005-03-13

19:04:51</ServerDateTime>;<Files>;<File>;<Type>;2</Type>;<DateTime>;2005-03-01

14:00:00</DateTime>;<atches>;</Patches>;<URL>;<CompleteURL>;http://www.test.com/sig.zip</CompleteURL>;</URL>;</File

>;<File>;<Type>;8</Type>;<DateTime>;2005-03-13

10:45:49</DateTime>;<atches>;</Patches>;<URL>;<CompleteURL>;http:///www.test.com/pre.zip</CompleteURL>;</URL>;</File

>;<File>;<Type>;32</Type>;<DateTime>;2005-03-01

11:00:00</DateTime>;<atches>;</Patches>;<URL>;<CompleteURL>;http://www.test.com/dat.zip</CompleteURL>;</URL>;</File>;

<File>;<Type>;1</Type>;<DateTime>;2005-03-14

00:31:57</DateTime>;<atches>;<ackedURL>;http://www.test.com/rche10.zip</PackedURL>;<Names>;<Name>;081111.up</Name>;<Name>;080437.up</Name>;<Name>;220958.up</Name>;<Name>;145625.up</Name>;<

Name>;092948.up</Name>;<Name>;175746.up</Name>;<Name>;112617.up</Name>;<Name>ATCH_

172702.up</Name>;<Name>;082805.up</Name>;<Name>;192259.up</Name>;</Names>;</Patches>;<URL>;

<CompleteURL>;http://www.test.com/av.zip</CompleteURL>;</URL>;</File>;</Files>;</FilesCatalog>;

論壇徽章:
1
榮譽會員
日期:2011-11-23 16:44:17
2 [報告]
發(fā)表于 2005-03-22 15:29 |只看該作者

ASP,PHP給瀏覽器返回XML

我猜你是不是在說如果讓一段PHP代碼顯示xml格式的文本信息?
如果是的話,直接 echo

論壇徽章:
0
3 [報告]
發(fā)表于 2005-03-22 15:54 |只看該作者

ASP,PHP給瀏覽器返回XML

可以這么說吧,但ECHO寫的時候有些字符不能正常寫出來
我的問題就是實現(xiàn)上面的那個會話過程

論壇徽章:
0
4 [報告]
發(fā)表于 2005-03-23 13:31 |只看該作者

ASP,PHP給瀏覽器返回XML


header("Content-type: text/xml; charset=gb2312";
然后
echo 'xml內(nèi)容';

否則瀏覽器會默認(rèn)成html格式處理

論壇徽章:
0
5 [報告]
發(fā)表于 2005-03-28 03:32 |只看該作者

ASP,PHP給瀏覽器返回XML

樓上正解。content-type錯誤

論壇徽章:
0
6 [報告]
發(fā)表于 2005-03-29 17:29 |只看該作者

ASP,PHP給瀏覽器返回XML

各位兄弟
請注意數(shù)據(jù)包哦
服務(wù)器返回的數(shù)據(jù)包:
HTTP/1.1 200 OK
Date: Mon, 14 Mar 2005 00:04:51 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html

是text/html
實現(xiàn)上面的回話過程就行
HELP ME
困擾我很久啦
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP