Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÃæÊÔÌâ»ã×Ü

»ù´¡Ìâ
¡¡¡¡1.±íµ¥ÖÐ getÓëpostÌá½»·½·¨µÄÇø±ð?
¡¡¡¡´ð£ºgetÓû§¶Ë½«Êý¾Ý¼Óµ½URLºó£¬¸ñʽΪ”?×Ö¶Î1=ÊäÈëÊý¾Ý1&×Ö¶Î2=ÊäÈëÊý¾Ý2&..."¡£
¡¡¡¡ÓÉÓÚgetÌá½»²ÎÊýºó»áÔÚµØÖ·À¸ÖÐÏÔʾ³öÀ´£¬ËùÒÔ»á²úÉúÑÏÖصݲȫÎÊÌâ¡£
¡¡¡¡get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬ÕâÖ÷ÒªÊÇÒòΪÊÜurl³¤¶ÈÏÞÖÆ;¶øpost¿ÉÒÔ´«Ê ......

phpÈí¼þ°æ °²×° ÎÊÌâ

ÕâÁ½ÌìÒ»Ö±ÔÚ°ïÈË×ö¸öÈí¼þ¿ÉÊÇ°³Ö»»áÓÃphp£¬php³ÌÐòµÄÔËÐÐÊÇ»ùÓÚApache·þÎñÆ÷µÄ£¬Ã»°ì·¨ ÒªÔËÐгÌÐò¾Í±ØÐëÔËÐзþÎñÆ÷Apache·þÎñÆ÷¿ÉÒÔÑ¡ÓÃ×é×°°æµÄ£¬ÏÂÃæ·ÖÏíÏÂÎÒµÄÅäÖ÷½·¨£¬ÓÃÒ»¸öСµÄÅú´¦Àí³ÌÐò¾Í¿ÉÒÔÍê³É¡£
ÏÂÃæ¾ÍÊÇÎÒµÄÅú´¦Àí³ÌÐò£º
@ ECHO OFF
copy d:\road\httpd-vhosts.conf c:\xampp\apache\conf\extra  / ......

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

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

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
¶àÎ ......

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


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