Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php ·µ»ØxmlÐÅÏ¢´íÎó - PHP / »ù´¡±à³Ì

Õâ¸öµØÖ·£ºhttp://maps.google.com/ig/api?weather=shanghai&hl=zh-cn
ÊÇgoogle·µ»ØµÄÒ»¸öÌìÆøÔ¤±¨xml


Ïëµ÷Óõ½±¾µØÀ´£º

<?php
readfile('http://maps.google.com/ig/api?weather=shanghai&hl=zh-cn');
?> 


Ìáʾ´íÎó£º

ÎÞ·¨ÏÔʾ XML Ò³¡£ 
ʹÓà XSL Ñùʽ±íÎÞ·¨²é¿´ XML ÊäÈë¡£Çë¸üÕý´íÎóÈ»ºóµ¥»÷ ˢа´Å¥£¬»òÒÔºóÖØÊÔ¡£ 


--------------------------------------------------------------------------------

Îı¾ÄÚÈÝÖз¢ÏÖÎÞЧ×Ö·û¡£´¦Àí×ÊÔ´ 'http://localhost/Flash_Weather/weather_google.php' ʱ³ö´í¡£µÚ 1 ÐУ¬Î»ÖÃ: 438 

<?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zippe...




ÊÇÔõô»ØÊÂÄØ£¿Ð»Ð»ÁË..
readfile¶ÁÈëÒ»¸öÎļþ²¢Ð´Èëµ½Êä³ö»º³å¡£ 

·µ»Ø´ÓÎļþÖжÁÈëµÄ×Ö½ÚÊý¡£Èç¹û³ö´í·µ»Ø FALSE ²¢ÇÒ³ý·ÇÊÇÒÔ @readfile() ÐÎʽµ÷Ó㬷ñÔò»áÏÔʾ´íÎóÐÅÏ¢¡£ 



PHP code:
<?php
$data = file_get_contents('http://maps.google.com/ig/api?weather=shanghai&hl=zh-cn');
$parser = xml_parser_create();
xml_parse_into_struct($parser, $data, $values, $index);
xml_parser_free($parser);
var_dump($values);
?>

{{


Ïà¹ØÎÊ´ð£º

ÀûÓÃC#±àдtxtת»¯µ½xmlµÄ³ÌÐò

txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔ­Êý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......

php »ñÈ¡Ò³ÃæÄÚÈÝ - PHP / »ù´¡±à³Ì

Ôڲɼ¯Ò»¸öÒ³ÃæµÄʱºòͨ³£¶¼ÊÇʹÓÃfile_get_contents($url)
²»¹ý·µ»ØµÄ½á¹ûÓÐʱºò»á²»È«
Èç¹ûÔÚhtmlÖÐʹÓà document.ready,ÔÚÒ³Ãæ×¼±¸ºÃºó£¬Ê¹ÓÃajax¶ÁÈ¡±ðÒ»²¿·ÖµÄÊý¾Ý
ÔÙͨ¹ýÐÞ¸Ähtml±êÇ©µÄÄÚÈÝ£¬¾Í²¿·ÖµÄÊý¾Ý¾ ......

ÈçºÎÓÃASP¶ÁÈ¡ XML - Web ¿ª·¢ / ASP

<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......

PHP+MYSQLÊý¾Ý¼¯´¦Àí - PHP / »ù´¡±à³Ì

1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ