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

ÔÚPHP5ÖÐʹÓÃDOM¿ØÖÆXML


PHP5ÖÐÔöÇ¿ÁËXML
µÄ
Ö§³Ö£¬Ê¹ÓÃDOM
À©Õ¹ÁËXML²Ù×÷µÄÄÜÄÍ¡£ÕâЩº¯Êý
×÷Ϊ PHP5 ºËÐĵÄÒ»²¿·Ö£¬ÎÞÐè±»°²×°
¼´¿ÉʹÓá£
ÏÂÃæµÄÀý×Ó¼òµ¥µÄÑÝʾÁËDOM¶ÔXMLµÄ²Ù
×÷£¬Ïêϸ½âÊÍÇë¿´´úÂë
ÖеÄ×¢ÊÍ
<?
/************************************************
**                   
use XML in PHP5
** reference site:
** 
http://cn.php.net/manual/zh/ref.dom.php
**
the follow codes need PHP5 support
** 
www.knowsky.com
*************************************************/
//Ê×ÏÈÒª´´½¨Ò»¸ö
DOMDocument¶ÔÏó
$dom = new DomDocument();
//È»ºóÔØÈëXMLÎļþ
$dom ->
load("test.xml");
//Êä³öXMLÎļþ
//header("Content-type: text/xml;charset=gb2312");
//echo
$dom -> saveXML();
//±£´æXMLÎļþ£¬·µ»ØֵΪint£¨Îļþ´óС£¬ÒÔ×Ö½ÚΪµ¥Î»£©
//$dom ->
save("newfile.xml");
echo "<hr/>È¡µÃËùÓеÄtitleÔªËØ:<hr/>";
$titles = $dom
-> getElementsByTagName("title");
foreach ($titles as $node){
 
echo $node -> textContent . "<br/>";
  //ÕâÑùÒ²¿ÉÒÔ
  //echo
$node->firstChild->data . "<br/>";
}
/*
echo
"<hr/>´Ó¸ù½áµã±éÀúËùÓнáµã£º<br/>";
foreach
($dom->documentElement->childNodes as $items) { 
  //Èç¹û½ÚµãÊÇÒ»¸öÔªËØ(nodeType ==
1)²¢ÇÒÃû×ÖÊÇitem¾Í¼ÌÐøÑ­»· 
  if
($items->nodeType == 1 && $items->nodeName == "item") { 
    foreach
($items->childNodes as $titles) { 
     
//Èç¹û½ÚµãÊÇÒ»¸öÔªËØ£¬²¢ÇÒÃû×ÖÊÇtitle¾Í´òÓ¡Ëü. 
     
if ($titles->nodeType == 1 && $titles->nodeName ==
"title") { 
        print
$titles->textContent . "\n"; 
     

    } 
&nb


Ïà¹ØÎĵµ£º

MVCÕæµÄÊʺÏPHPô£¿


½üÀ´Éè¼Æģʽ·çÐУ¬MVCËæ´¦¿É¼û£¬PHPÁìÓòÒ²²»ÀýÍ⣬ºÜ¶àÂÛ̳¶¼¿ªÊ¼ÌÖÂÛÔÚPHPÖÐʹÓÃMVC¡£È»¶ø£¬M¡¢V¡¢CÔÚPHPÖе½µ×¸ÃÈçºÎʵÏÖ£¿MVCÕæµÄÊʺÏPHPô£¿ÕâÀïEasy¸ø³öһЩ×Ô¼ºµÄ˼¿¼¡£
½üÀ´Éè¼Æģʽ·çÐУ¬MVCËæ´¦¿É¼û£¬PHPÁìÓòÒ²²»ÀýÍ⣬ºÜ¶àÂÛ̳¶¼¿ªÊ¼ÌÖÂÛÔÚPHPÖÐʹÓÃMVC¡£È»¶ø£¬M¡¢V¡¢CÔÚPHPÖе½µ×¸ÃÈçºÎʵÏÖ£¿MVCÕæµÄÊʺÏPHP ......

ÄÄÖÖPHP IDEÏà¶Ô½ÏºÃ

×ÜÌå¶øÂÛ£¬Ò»¸öºÃµÄIDEÐèÒªÂú×ãµÄ¹¦ÄÜ£º
¡·1.
»ù±¾µÄIDEÒªÇ󣺴úÂë¹ÜÀí£¬±à¼­Æ÷µÄ¸÷ÖÖÖÇÄܹ¦Äܵȣ»
¡·2. ÔËÐкÍdebug£º¿ÉÒÔ±¾µØÔ¶³Ì·Ö±ðscriptºÍweb
page½øÐÐrunºÍdebug£»
¡·3. ÓÉÓÚPHP¿ª·¢µÄͨ³£¹ý³Ì¶¼ÊÇ£º´úÂëÔÚremoteµÄserverÉÏ£¬¿ª·¢ÈËÔ±µÄ»úÆ÷ÐèҪͨ¹ýFTP»òÕßSSHÁ¬½Óµ½serverÉϽøÐпª·¢ºÍµ÷ÊÔ£¬Òò´ËÈç¹ûIDEÔÚÈç ......

ÎÒµÄphpÖ®ÂÃ

    ²»Öª´ÓʲôʱºòÃÔÁµÉÏÁËphp£¬ÔÚëüëÊÖ®ÖпªÊ¼ÁËÎҵıà³Ì֮·.......
    Ìý˵csdn¸ßÊÖÈçÔÆ£¬ºÜÏë½áʶ־ͬµÀºÏµÄÅóÓÑ£¬ÎÞÐֵܲ»±à³Ì£¬Ï£Íû´ó¼ÒÒ»Æð¿ªÍØÎÒÃǵÄÇ°³Ì£¬±à³Ì֮·£¬²»Ôٹµ¥Ç°ÐÐ!
    ³É¹¦Ö®Â·ÍäÇú¶øÂþ³¤£¬ÏàÐŲ»Çü²»ÄÓµÄŬÁ¦£¬ÏàÐÅÄêÇᣬʤÀûÒ»¶¨ÊôÓÚÎÒÃÇ£¬¼Ó ......

ÓÃPHPʵÏÖ·ÉÐÅapi½Ó¿Ú·¢·ÉÐŶÌÐÅ

²»¹ýÕâ¸ö²»ÄܺͷÉÐÅ¿Í»§¶ËͬʱµÇ¼£¬¶þÕßÖ»ÄܵÇÒ»¸ö£¬Ö»Òª´úÂëÔÚdwÀï´ò¿ª£¬¿Í»§¶Ë¾ÍµôÁ˺ǺÇ~~~
<?php
/*
* Created on 2010-4-18
* MiaoPengFei
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$data["username"] = ;//ÕâÀïÌ ......

PHPº¯Êý

1.1
exit() º¯ÊýÊä³öÒ»ÌõÏûÏ¢£¬²¢Í˳öµ±Ç°½Å±¾¡£
Èç¹û status
ÊÇ×Ö·û´®£¬Ôò¸Ãº¯Êý»áÔÚÍ˳öÇ°Êä³ö×Ö·û´®¡£
Èç¹û status
ÊÇÕûÊý£¬Õâ¸öÖµ»á±»ÓÃ×÷Í˳ö״̬¡£Í˳ö״̬µÄÖµÔÚ 0 ÖÁ 254 Ö®¼ä¡£Í˳ö״̬ 255 ÓÉ PHP ±£Áô£¬²»»á±»Ê¹Óá£×´Ì¬ 0 ÓÃÓڳɹ¦µØÖÕÖ¹³ÌÐò¡£
1.2
301 Moved Permanently ¿Í»§ÇëÇóµÄÎĵµÔÚÆäËûµØ·½£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ