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

phpÖ®XMLתÊý×麯Êý

<?
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the tag values - this results in a different array structure in the return value.
* $priority - Can be 'tag' or 'attribute'. This will change the way the resulting array sturcture. For 'tag', the tags are given more importance.
* Return: The parsed XML in an array form. Use print_r() to see the resulting array structure.
* Examples: $array = xml2array(file_get_contents('feed.xml'));
* $array = xml2array(file_get_contents('feed.xml', 1, 'attribute'));
*/
function xml2array($contents, $get_attributes=1, $priority = 'tag') {
if(!$contents) return array();
if(!function_exists('xml_parser_create')) {
//print "'xml_parser_create()' function not found!";
return array();
}
//Get the XML parser of PHP - PHP must have this module for the parser to work
$parser = xml_parser_create('');
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, trim($contents), $xml_values);
xml_parser_free($parser);
if(!$xml_values) return;//Hmm...
//Initializations
$xml_array = array();
$parents = array();
$opened_tags = array();
$arr = array();
$current = &$xml_array; //Refference
//Go through the tags.
$repeated_tag_index = array();//Multiple tags with same name will be turned into an array
foreach($xml_values as $data) {
unset(


Ïà¹ØÎĵµ£º

PHP PDO ѧϰ±Ê¼Ç

¡öPDOΪºÎÎ
POD£¨PHP Data Object£©À©Õ¹ÔÚPHP5ÖмÓÈ룬PHP6Öн«Ä¬ÈÏʶÓÃPDOÁ¬½ÓÊý¾Ý¿â£¬ËùÓзÇPDOÀ©Õ¹½«»áÔÚPHP6±»´ÓÀ©Õ¹ÖÐÒƳý¡£¸ÃÀ©Õ¹ÌṩPHPÄÚÖÃÀà PDOÀ´¶ÔÊý¾Ý¿â½øÐзÃÎÊ£¬²»Í¬Êý¾Ý¿âʹÓÃÏàͬµÄ·½·¨Ãû£¬½â¾öÊý¾Ý¿âÁ¬½Ó²»Í³Ò»µÄÎÊÌâ¡£
ÎÒÊÇÅäÖÃÔÚwindowsÏÂ×ö¿ª·¢Óõġ£
¡öPDOµÄÄ¿±ê
ÌṩһÖÖÇáÐÍ¡¢ÇåÎú¡¢·½±ãµÄ A ......

PHP»·¾³°²×°ºÍÅäÖÃ

¼¯³É»·¾³:WAMP...(W-windows,ÀïÃæÓÐApache·þÎñÆ÷¡¢Mysql¡¢PhpºÍMysql¿ÉÊÓ»¯¹¤¾ßSQLite)
Ps:°²×°¹ý³Ì»áÓÐÌáʾ£¬ÊÇ·ñ×ÔÆô¶¯£¬Ä¬ÈÏ¿ª·¢Ä¿Â¼¡¢Ä¬ÈÏä¯ÀÀÆ÷£¬°²×°Íê³Éºó»áÔÚÓÒϽÇÓиöС±íÅÌ£¬ÒòΪĬÈÏ°²×°Íê³ÉºóÊÇÓ¢ÎÄ°æµÄ£¬ÔÚС±íÅÌÉϵãÓÒ¼ü-->language-->Ñ¡ÔñÖÐÎľÍÐÐ)
¿ª·¢¹¤¾ß:easyeclipse php...»¹²»´íµÄÒ»¸ö¿ª·¢¹¤ ......

PHPµÄÇ°¾°

   Ëæ×ÅWeb2.0µÄÉýλ¥ÁªÍøµÄ·¢Õ¹Ó­À´ÐÂÒ»ÂÖµÄÈȳ±£¬ÓÉÓÚ»¥ÁªÍø±¾ÉíµÄ¿ìËÙ·¢Õ¹¡¢²»¶Ï´´ÐµÄÌص㣬¾ö¶¨ÁËÖ»ÓÐÒÔ×î¿ì¿ª·¢ËٶȺÍ×îµÍ³É±¾£¬²ÅÄÜȡʤ£¬²ÅÄÜʼÖÕ±£³ÖÒ»¸öÍøÕ¾µÄÁìÏÈÐÔºÍÎüÒý¸ü¶àµÄÍøÃñ¡£
 
»¥ÁªÍøµÄÆóÒµÉú´æºÍ¾ºÕùµÄºËÐÄÔÚÓÚ¼¼Êõ£¬¼¼Êõ/Ñз¢È˲ÅÓÀÔ¶ÊÇÕâЩÆóÒµ²»¿É»òȱµÄ¹Ø¼üÈËÎֻÓÐÓµÓÐ×ÊÉ ......

php Á´½Óoracle phpµ÷ÓÃoracle´æ´¢¹ý³Ì


phpµ÷ÓÃoracleÐд洢¹ý³Ì############################################################
PHP³ÌÐò·ÃÎÊÊý¾Ý¿â£¬ÍêÈ«¿ÉÒÔʹÓô洢¹ý³Ì£¬ÓÐÈËÈÏΪʹÓô洢¹ý³Ì±ãÓÚά»¤
²»¹ýÈÊÕß¼ûÈÊ£¬ÖÇÕß¼ûÖÇ¡£
ÔÚÕâ¸öÎÊÌâÉÏ£¬Å¼ÈÏΪʹÓô洢¹ý³ÌÒâζ×űØÐëÒªDBAºÍ¿ª·¢ÈËÔ±¸ü½ôÃÜÅäºÏ,Èç¹ûÆäÖÐÒ»·½¸ü±ä£¬ÔòÏÔÈ»ÄÑÒÔά»¤¡£
µ«ÊÇʹÓô洢 ......

PHPµÄÊý¾ÝÀàÐͺÍÊý×éÏê½â


 PHPÊÇÈõÀàÐÍÓïÑÔ¡£
»ù±¾Êý¾ÝÀàÐÍ£ºinteger¡¢string¡¢boolean¡¢float
¸´ºÏÊý¾ÝÀàÐÍ£ºarray¡¢object
»ù±¾Êý¾ÝÀàÐ;Ͳ»ËµÁË£¬ÏÂÃæ¿´Ò»¸öÊý×éÏà¹ØµÄһЩÀý×Ó¡£
$test1=array(1,2,3,4);//¶¨ÒåÁËÒ»¸ö°üº¬4¸öÊýµÄÊý×é
$test1=array("new1"=>1,"new2"=>2);//Á½¸ö±äÁ¿µÄÊý×é,array['new1']=1,array['new2']=2
¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ