xmlСÎÊÌâÇó¾È! - PHP / »ù´¡±à³Ì
webservice ¸øÎÒÒ»¸ö µØÖ·£º
http://www.xxxxxxxxxxxxxxx.aspx?...
Ö±½ÓÔÚä¯ÀÀÆ÷ÊäÈëÕâ¸öµØÖ· £¬ ÏÔʾµÄÊÇXML¡£
ÎÒÏÖÔÚÏ£ÍûÓÃÎÒ×Ô¼ºµÄPHPÀï°ÑÕâ¸öXMLÊä³öÀ´£¬Ôõô°ì°¡£¿
ÎÒÈç¹ûÕâÑù£º
header("Content-Type: application/xml");
print(http://www.xxxxxxxxxxxxxxx.aspx?...);
È´»¹ÊÇÎÞ·¨Êä³öÄǸöXML£¬Firefoxϵõ½µÄÊÇ£º
XML½âÎö´íÎó£ºÎ´×éÖ¯ºÃ
IEϵõ½µÄÊÇ£º
ÎÞ·¨ÏÔʾ XML Ò³
ÎÒÏÖÔÚÏ£ÍûÓÃÎÒ×Ô¼ºµÄPHPÀï°ÑÕâ¸öXMLÊä³öÀ´£¬Ôõô°ì°¡£¿
echo file_get_contents("http://www.xxxxxxxxxxxxxxx.aspx?...");
.....
header("Content-Type: application/xml");
echo file_get_contents(http://www.xxxxxxxxxxxxxxx.aspx?...);
Êý¾ÝÊÇxml²¢²»´ú±íÊÇwebservice£¬webservice ÊÇ¿ÉÒÔ½»»¥µÄ¡£
Èç¹ûÊÇwebservice ×îºÃÓÃwebservice µÄ·½Ê½Á¬½Ó
Ö»ÒªÏÔʾµÄ»°£¬Ö»ÐèÒªheader(location:http://www.xxxxxxxxxxxxxxx.aspx?...);
¾Í¿ÉÒÔÁË
Èç¹ûÊDzâÊÔwebservice·µ»Ø»ØÀ´µÄÊý¾Ý£¬ÔòÐèÒª°Ñresponse¹ýÀ´µÄÊý¾Ýת³ÉhmtlÄܹ»ÏÔʾµÄ×Ö·û²ÅÐУ¬Õâ¸öתµÄº¯ÊýÊÇhtmlspecialchars()
ÎÒÒ»°ãÓÃÏÂÃæµÄ´úÂë²âÊÔwebservice·µ»ØÀ´µÄÊý¾Ý
echo (htmlspecialchars($soap->response,ENT_QUOTES));
Èç¹ûÏÔʾÂÒÂëµÄ»°£¬¼ÇµÃת»»±àÂë
ѧϰ£¡£¡
Ïà¹ØÎÊ´ð£º
ÏÖÔÚÓиöxmlÎļþÊÇ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
PHP¸ÕÈëÃÅѧϰ,ÓÑÇ鶥һ¸ö
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");< ......
ÔÚPHPÖÐÓÐûÓÐÏñASPÖеļǼ¼¯(ADODB.Recordset )ÕâÖÖÀàÐ͵ĶÔÏó?¿É²»¿ÉÒÔÏñÔÚASPÖÐÒ»Ñùͨ¹ý¼Ç¼¼¯À´¸üÐÂÊý¾Ý¿â.ÈçÏÂÃæÕâÑù.
VBScript code:
set rs=server.createobject("adodb.recordset")
......