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

ÔÚPHPÖбéÀúÊý×éÔªËØ

Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/20100411/56.html
ÔÚPHPÖÐʹÓÃforeachº¯Êý¿ÉÒÔ±éÀúÊý×é¡£Foreach½öÄÜÓÃÓÚÊý×飬Óï·¨ÈçÏ£º
 Foreach(array as $value) statements
 Foreach(array as $key=>$value) statement
µÚÒ»ÖÖÓï·¨±éÀúÊý×éʱ£¬Ã¿´ÎÑ­»·Ê±£¬µ±Ç°µ¥ÔªµÄÖµ±»¸³¸ø$value£¬Êý×éÄÚ²¿µÄÖ¸ÕëÏòÇ°ÒÆһλ¡£
ÀýÈ磺
 <?php
 $php = array(0=>”php”,1=>”phpdo”,2=>”www.phpdo.net”);
 foreach($php as $value)
 {
 echo “value:$value;”;
 }
 echo “<BR>”;
//µÚ¶þÖÖÓï·¨±éÀúʱ£¬ÔÚÿ´ÎÑ­»·Ê±£¬¼üÖµ»á±»¸³Öµ¸ø±äÁ¿key.
 foreach($php as $key=>$value)
 {
 echo “key:$key;value:$value”;
 }
 ?>
½á¹û£º
value:php;value:phpdo;value:www.phpdo.net;
key:0;value:phpkey:1;value:phpdokey:2;value:www.phpdo.net
¶ÔÓÚ¶àάÊý×éÈç¿ÉʹÓÃÄØ£¿
û´í¡£ÄúÒ»¶¨Ïëµ½ÁË°É£¿
ÀýÈ磺
 <?php
 $php = array(“php1″=>array(0=>”php”,1=>”phpdo”),”php2″=>array(0=>”phpdo.net”,1=>”www.phpdo.net”));
 foreach($php as $value1)
 {
 foreach($value1 as $value2)
 {
 echo “$value2\n”;
 }
 }
 ?>
½á¹û£º
php phpdo phpdo.net www.phpdo.net


Ïà¹ØÎĵµ£º

PHPÄ£°å

<!--<?php
     <!--
EOT;
if($yy_en_lang==1){
echo <<<EOT
-->
<a href="$index_e_url">English</a>
<!--
EOT;
}
echo <<<EOT
-->
?>
ÕâÊÇÒ»¶ÎSmartyÄ£°å´úÂ룬¿ÉÊÇÎÒ¿´²»¶®Õâ¸ö¹æÔòÇë¸ßÊÖÖ¸µãһϰ¡£¡£¡Ð»Ð»!
»òÕß ......

¹ØÓÚMemcacheDB PHP¿Í»§¶ËµÄÎÊÌâ¼°½â¾ö°ì·¨

http://blog.developers.api.sina.com.cn/?p=264
×î½üMemcacheDBÓʼþÁбíºÍÑз¢²¿ÄDZßͬʱ¨¸æPHPµÄmemcache¿Í»§¶Ëphp-memcache¾­³£³ö ÏÖ¶ÏÁ¬½ÓµÄÎÊÌ⣺
PHP Notice:  Memcache::get(): Server ………. (tcp 11211) failed with: Failed reading line from stream (0) with pecl-memcache 3.*
&h ......

phpÖÐmb_convert_encoding ºÍ iconv µÄÇø±ð

mb_convert_encodingÕâ¸öº¯ÊýÊÇÓÃÀ´×ª»»±àÂëµÄ¡£Ô­À´Ò»Ö±¶Ô³ÌÐò±àÂëÕâÒ»¸ÅÄî²»Àí½â£¬²»¹ýÏÖÔÚºÃÏñÓе㿪ÇÏÁË¡£
²»¹ýÓ¢ÎÄÒ»°ã²»»á´æÔÚ±àÂëÎÊÌ⣬ֻÓÐÖÐÎÄÊý¾Ý²Å»áÓÐÕâ¸öÎÊÌâ¡£±ÈÈçÄãÓÃZend Studio»òEditplusд³ÌÐòʱ£¬ÓõÄÊÇgbk±àÂ룬Èç¹ûÊý¾ÝÐèÒªÈëÊý¾Ý¿â£¬¶øÊý¾Ý¿âµÄ±àÂëΪutf8ʱ£¬Õâʱ¾ÍÒª°ÑÊý¾Ý½øÐбàÂëת»»£¬²»È»½øµ½Ê ......

PHPÓëACCESSÁ´½ÓµÄÀà

[php]
<?php
--------------------------------------------------------------------
//FileName:class.php
//Summary: AccessÊý¾Ý¿â²Ù×÷Àà
//Author:  forest
//CreateTime: 2006-8-10    
//LastModifed:
//copyright (c)2006
//http://freeweb.nyist.net/~chairy 
//cha ......

php¿ª·¢»·¾³ÉèÖÃ

1£º apache·þÎñÆ÷°²×°.apache_2.0.59-win32-x86-no_ssl.msi¡£
ÐÞ¸Äconf\httpd.confÖеÄÎļþ£¬ÐÞ¸ÄλÖÃΪ£º
DocumentRoot  "c:/webpage"  ÉèÖÃÐéÄâĿ¼ c:/webpage.
DirectoryIndex  index.html  index.html.var   index.php
==ʹapache·þÎñÆ÷ʶ±ðphpµÄÀ©Õ¹Ãû¡£
ÔÚ<Directory "c:/pr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ