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

ÈçºÎÔÚPHPÖд´½¨Êý×é

Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/20100409/54.html
ÈçºÎÔÚPHPÖд´½¨Êý×éÄØ£¿
ÔÚPHPÖÐʹÓÃarrayº¯ÊýÀ´´´½¨Ò»¸öÊý×飬ËüÔÊÐíÒ»¶¨ÊýÁ¿ÓöººÅkey=>value²ÎÊý¡£Key¿ÉÒÔÊÇinteger»òÕßstringÀàÐÍ£¬value¿ÉÒÔÊÇÈκÎÖµ¡£
ÀýÈ磺
 <?php
 $array = array(“php1″=>”phpdo”,2=>”www.phpdo.net”);
 echo $array["php1"];
 echo ‘<br>’;
 echo $array[2];
 ?>
½á¹û£º
phpdo
www.phpdo.net
Êý×éÓÐһάµÄÒ²ÓжþάµÄ£¬ÈçºÎÔÚPHPÖд´½¨¶þάÊý×éÄØ£¿
û´í¡£¾ÍÊÇÈÃһάÊý×éµÄÔªËØÒ²³ÉΪһ¸öÊý×é¡£
ÀýÈ磺
 <?php
 $array = array(“php1″ =>array(0 =>”php”,1 =>”phpdo”),”php2″ =>array(0=>”phpdo.net”,1=>”www.phpdo.net”));
 echo $array["php1"][0];
 echo “<BR>”;
 echo $array["php1"][1];
 echo “<BR>”;
 echo $array["php2"][0];
 echo “<BR>”;
 echo $array["php2"][1];
 ?>
½á¹û£º
php
phpdo
phpdo.net
www.phpdo.net
ÔÚʵ¼Ê±à³ÌÖв»¿ÉÄÜÏñÕâ¸öÀý×ÓÒ»ÑùʹÓÃÈç´Ë¶àµÄecho£¬ÕâÑù»áʹ´úÂë±äµÃºÜ³¤¡£
ÔÚPHPÖÐÓÐÁ½¸öÊä³öÓï¾ä£ºechoºÍprint¡£
¶øprint_RÊÇÓÃÀ´Êä³öÊý×éµÄ¡£
ÀýÈ磺
 <?php
 $array = array(“php1″ =>array(0=>”php”,1=>”phpdo”),”php2″=>array(0=>”phpdo.net”,1=>”www.phpdo.net”));
 print_r($array);
 ?>
½á¹û£º
Array ( [php1] => Array ( [0] => php [1] => phpdo ) [php2] => Array ( [0] => phpdo.net [1] => www.phpdo.net ) )


Ïà¹ØÎĵµ£º

PHPÖÐforeachÑ­»·±éÀúÊý×é

<?php
 
  //ÉùÃ÷Êý×é±äÁ¿
  $arr = array('ÕÅÈý','ÀîËÄ','ÍõÎå','ÀîÃ÷');
 
  //foreachÑ­»·±éÀúÊý×é
  foreach($arr as $key => $value){
   //×¢Òâ“$value”ºó±ØÐëÒªÒ»¸ö¿Õ¸ñ£¬·ñÔòÊä³öµÄ½á¹û²»ÕýÈ·
   echo "Öµ$value µÄϱêΪ$key<br/ ......

php ½âÎö excel ´æ´¢µ½ mysql ÂÒÂë


±àÂëÊǸöºÜ»ù´¡µÄÎÊÌ⣬ҲÊÇ´ó¼ÒºÜÈÝÒ׺öÂÔµÄÎÊÌ⣬д´úÂë֮ǰ¶à¶à¿¼ÂÇ£¬ÒÔºó»áÉٺܶàÂé·³¡£
PHP·¢Õ¹Á˲»ÉÙ£¬ÏÖÔÚpearÓÃÆðÀ´ºÜ·½±ã£¬ÆäÖоÍÓÐÏà¹ØµÄclassÀ´¶ÁÈ¡ExcelÎļþÀïÃæµÄÄÚÈÝ£¬Èç¹û²»ÏëʹÓÃpearµÄ»°£¬¿ÉÒÔ¿¼ÂÇʹÓÃexcel_class.php£¬googleһϣ¬¿ÉÒÔÕÒµ½Õâ¸öclassµÄsource codeÏÂÔØ£¬Ò²ÄÜÕÒµ½»ù±¾µÄexample c ......

phpÔÚ2003SERVERϵÄÅäÖÃ

Ò»¡¢ÏµÍ³»·¾³¼°³ÌÐò˵Ã÷
1¡¢²Ù×÷ϵͳΪwindows server 2003
2 ¡¢iis°æ±¾Îª6.0
3¡¢php°æ±¾Îª5.2.9,¹Ù·½ÏÂÔصØÖ·: http://www.php.net/downloads.php
4¡¢mysql°æ±¾Îª5.1.34,¹Ù·½ÏÂÔصØÖ·:http://dev.mysql.com/downloads/mysql
¶þ¡¢°²×°iis
1¡¢²åÈëwindows server 2003ϵͳ°²×°¹âÅÌ
2¡¢¿ªÊ¼-¿ØÖÆÃæ°å-Ìí¼Óɾ³ý³ÌÐ ......

ÎÒµÄphpµÄѧϰ

<?
class upload{
private $name;                 //$_FILES['file'][name]
private $type;                 //$_FILES['file'][type]
privat ......

php ³ÌÐòµÄ¹ú¼Ê»¯gettext

²½ÖèÒ»£º´î½¨»·¾³
1£¬Ê×ÏȲ鿴ÄãµÄphpÀ©Õ¹Ä¿Â¼ÏÂÊÇ·ñÓÐphp_gettext.dllÕâ¸ö
Îļþ£¬Èç¹ûûÓУ¬Õâ¾ÍÐèÒªÄã
ÏÂÔØÒ»¸ö»òÊÇ´ÓÆäËûµØ·½¿½±´Ò»¸ö£¬È»ºó·Åµ½phpÀ©Õ¹Ä¿Â¼¡£
2£¬´ò¿ªphp.ini£¬²é
ÕÒ”;extension=php_gettext.dll“ £¬È»ºóÈ¥³ý×¢ÊÍ£¬ÖØÆôapache¡£
²½Öè¶þ:Ô­Àí½²½â
¼ÙÈçÄãµÄû
Óйú¼Ê»¯µÄ³ÌÐòÀïÓÐÕâÑù ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ