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

PHP²ËÄñÇóÖú

<?php
  //¾²Ì¬±äÁ¿
  function myfunc(){
 
  static $mystr;
  $mystr = "¹þ";
 
  echo $mystr."<br>\n";
 
  }
   
  myfunc();
  myfunc();
  myfunc();
  ?>

¸÷λÄÜ°ïÎÒÈ·¶¨ÏÂÊä³öô£¿ÄܸæËßÎÒΪʲôô£¿Ð»Ð»£¡
¹þ
¹þ¹þ
¹þ¹þ¹þ
ÊÇÕâ¸ö½á¹û°É?

¹þ <br>
¹þ <br>
¹þ <br>
 
staticÊǾ²Ì¬±äÁ¿£¬ÊÇÔÚ±àÒëµÄʱºò·ÖÅäÄÚ´æ¿Õ¼ä£¬Ò»°ã±äÁ¿ÊÇÔÚÔËÐÐʱ·ÖÅäÄÚ´æ¿Õ¼ä¡£
²»¹ýÄãÕâ¸öËƺõûʲôÓÃ

PHP code:

¹þ
¹þ
¹þ

×¢£º<br>Òþ²ØÁË




¹þ
¹þ
¹þ

staticÔÚÕâ¸ö³ÌÐòÀïûÓÐÓá£

ºÇºÇ ¿´À´ÊÇ°¡ £¬

µ«ÊÇÎÒ²»ÖªµÀ Ô­Àí£¬Àý×Ó˵ÊÇstaticÓÐÓõģ¬²»ÖªµÀΪʲôûÓÃÁË°¡ 

²»Çå³þphpÔËÐÐÔ­Àí£¬Ï£ÍûË­ÄÜÖ¸½Ì°¡

Ë­Äܽ²ÏÂÔ­Àí°¡ °ÝÍдó¼Ò

ÄãµÄÕâ¸öÎÊÌ⣬ÊÇÄãÀí½â´íÁ˾²Ì¬±äÁ¿µÄÓ÷¨£¡ÄãÏȽ«ÎҵĴúÂëÔËÐÐÊÔÊÔ£º
<?php 
  //¾²Ì¬±äÁ¿ 
function myfunc(){ 
  static $mystr; 
  $mystr .= "¹þ"; 
  echo $mystr."<br>";

myfunc();
myfunc();
myfunc();
?> 

±¸×¢


Ïà¹ØÎÊ´ð£º

Çó´ïÈ˽«Ò»¶ÎPHPת»¯ÎªASP£¬Ð»Ð»£¡ - Web ¿ª·¢ / ASP

´úÂëÈçÏ£º
function uc_get_user($username, $isuid=0) {
$return = call_user_func(UC_API_FUNC, 'user', 'get_user', array('username'=>$username, 'isuid'=>$isuid));
return UC_CONNECT == 'mysql' ......

phpʱ¼äÕýÔòÎÊÌâ - PHP / »ù´¡±à³Ì

PHP code:

$date = '2009-12-25';
$ptn = '/([\d]{4})[- \/](0?[\d]|1[0-2])[-\/ ](0?[\d]|[1-2][\d]|3[0-1])/';
if (preg_match($ptn,$date,$out))
{
print_r($out);exit();
}
½á¹ûΪ:
PHP code:
......

MySQL´íÎó - PHP / »ù´¡±à³Ì

ÎÒ°²×°µÄÕâ¸öÈí¼þVertrigoServ£¬ÔÚwindows7ÖÐÔËÐУ¬Í¼±ê¼ÓºÅΪÀ¶É«£¬±¨MySQLµÄ´íÎó£¬Çë½Ì¸÷λ¸ßÊÖ¸ÃÔõÑù¸ü¸Ä¡£Ð»Ð»¸÷λ£¡
mysql ·þÎñÊÇ·ñÆðÀ´ÁË£¿

ûÓУ¬±¨µÄÊǶ˿ڴíÎó£¬ÔÚÅäÖÃÎļþµ±ÖиÄÁË£¬Ò²²»ÐÐ

¿ÉÒÔÓÃÈ ......

PHPº¯ÊýÎÊÌâ

ÎÒÔÚ¼¯³É¹¤¾ßWAMP5ÖУ¬Ïëд¸öº¯Êý²âÊÔ²âÊÔ£¬¿ÉÊǽá¹ûÔõô»á¸øÎÒ±¨´í£¿£¿£¿ÊDz»ÊÇÅäÖÃÎļþûÐ޸ģ¬Çë½Ì¸÷λ´óϺÃÇ¡£

Äǿ϶¨Ä㺯ÊýÊÇÓÐÎÊÌâµÄÁË
·¢À´¿´¿´°É

ÐÐÁË£¬Ã÷°×ÊÇʲôÎÊÌâÁË£¬Ð»Ð»ÁË£¡£¡£¡£¡

<?ph ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ