<?php
function writeFile($filename,$data)
{
$fd = fopen($filename,"w+");
fwrite($fd,$data);
fclose($fd);
}
ob_start();//打开缓冲区
$data =$HTTP_RAW_POST_DATA;
writeFile("/www/htdocs/wap/unicom/orderlog/request.xml",$data);//写
$xmldata = '<?xml version="1.0" encoding="UTF-8"?>
<webmethod id="service_disorder_to_cp">
<result status="1"/>
</webmethod>';
writeFile("/www/htdocs/wap/unicom/orderlog/response.xml",$xmldata);//写
echo $xmldata;
ob_end_flush();//发送内部缓冲区的内容到浏览器,并且关闭输出缓冲区
?>
其中解析部分就不写了....