PHP µÄÒýÓñäÁ¿ÎÊÌâ
$xml = '../data/news.xml' ;
$qp = qp($xml, 'news_root')->children();
$arrData = array() ;
$i = 0 ;
foreach( $qp as $child )
{
print_r( $arrData );
echo "<br/>hi<br/>";
unset($arrSub);
$arrSub = array() ;
array_push( $arrData , &$arrSub );
print_r( $arrData );
echo "<br/>";
// $arrData[] = &$arrSub;
$child = $child->children() ;
foreach( $child as $item )
{
$arrSub[ $item->tag() ] = $item->text();
}
print_r( $arrData );
echo"<br/>";
}
ÉÏÃæµÄ´úÂë,×¢Òâ unset($arrSub) Õâ¾ä.
Îҵı¾ÒâÊÇ $arrData ½âÎö³öxmlµÄ2²ãÄÚÈÝ.
ÎÒÓÃarray_pushѹÈëÒ»¸öÒýÓõÄÊý×é arrSub ,
È»ºó²Ù×÷arrSub,µÈÓÚÐÞ¸ÄarrData.
µ«ÊÇ,ÕâÆäʵÊÇÓÐÎÊÌâµÄ.
ÏÔʾarrData×îºóµÄÄÚÈÝÈ«ÊÇ×îºóÒ»ÌõxmlÄÚÈݵĸ´ÖÆ. (ÎÒµÄxml×îºóÊÇ¿ÕÏî,ËùÒÔarrDataÊÇ:[ [],[] ] ,¶ø²»ÊÇÕýÈ·µÄ: [ [data1,data2] , [] ]
µ±ÎÒÓÃÒýÓðÑarrSubѹÈëarrDataºó,
Ò»¸öÑ»·¹ýºó,ÓÖÓöµ½Óï¾ä $arrSub = array() ; Õâ¾ÍÓÐÎÊÌâÁË,Õâ¾ä»°Ö´Ðкó, arrDataÀïÃæµÄÒ»¸öÒ²±ä³ÉÁË¿ÕµÄarray.
ËùÒÔ±ØÐë½â³ýÒýÓà unset( $arrSub ) ¾ÍÄܽâ¾öÎÊÌâ.
Ïà¹ØÎĵµ£º
how to install apache, PHP and MySQL on Linux
This tutorial explains the installation of Apache web server, bundled
with PHP and MySQL server on a Linux machine. The tutorial is primarily for SuSE
9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all
Linux-like operating ......
REQUEST_URI ·µ»ØµÄÊÇ°üÀ¨ºóÃæÊý¾Ý´®µÄµØÖ·£¬Èç index.php?str=1234 PHP_SELF ÊÇ index.php
--------------------------------------------------------------------------------
$_SERVER[’PHP_SELF’]ÔÚ¿ª·¢µÄʱºò³£»áÓõ½£¬Ò»°ãÓÃÀ´ÒýÓõ±Ç°ÍøÒ³µØÖ·£¬²¢ÇÒËüÊÇϵͳ×Ô¶¯Éú³ÉµÄÈ«¾Ö±äÁ¿£¬Ò²»áÓÐʲôÎÊÌâô?È ......
ת×Ô£ºhttp://www.phpq.net
×¼±¸£º
1¡¢Ò»Ì¨°²×°ºÃµÄ Windows 2003 ·þÎñÆ÷£¬²¢ÇÒÒѾ°²×°ÁË IIS 6¡£
2¡¢ÏÂÔØ windows °æµÄ PHP ¶þ½øÖÆѹËõ°ü¡£
°²×°£º
½âѹËõ PHP ¶þ½øÖÆѹËõ°üµ½ C:\php Ŀ¼Ï£¨ÕâÀï¼ÙÉè C: ÅÌÊÇϵͳÅÌ£¬¼´°²×°ÁËWindows ϵͳµÄÅÌ£¬Èç¹ûϵͳÅÌÊÇ D:
ÅÌ£¬Ôò½âѹËõµ½ D:\php Ŀ¼Ï£¬ÒÔ´ËÀàÍÆ£¬Ï ......
ÒÔ¶¯ÊÖʵ¼ùΪÈÙ , ÒÔÖ»¿´²»Á·Îª³Ü;
ÒÔ´òÓ¡ÈÕ־ΪÈÙ , ÒÔµ¥²½¸ú×ÙΪ³Ü;
ÒÔ¿Õ¸ñËõ½øΪÈÙ , ÒÔÖƱíËõ½øΪ³Ü;
ÒÔµ¥Ôª²âÊÔΪÈÙ , ÒÔÈ˹¤²âÊÔΪ³Ü;
ÒÔÄ£¿é¸´ÓÃΪÈÙ , ÒÔ¸´ÖÆÕ³ÌùΪ³Ü;
ÒÔ¶à̬ӦÓÃΪÈÙ , ÒÔ·ÖÖ§ÅжÏΪ³Ü;
ÒÔPythonicΪÈÙ , ÒÔÈßÓàÍÏí³Îª³Ü;
ÒÔ×ܽá·ÖÏíΪÈÙ , ÒÔ¹òÇóÆä½âΪ³Ü; ......
´úÂëÈçÏÂ:
<?php
/* ÍøÕ¾ÑéÖ¤Âë³ÌÐò
* ÔËÐл·¾³£º PHP5.0.18 ϵ÷ÊÔͨ¹ý
* ÐèÒª gd2 ͼÐοâÖ§³Ö£¨PHP.INIÖÐ php_gd2.dll¿ªÆô£©
*&nbs ......