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

¹ØÓÚphpÃæÏò¶ÔÏóµÄ¾²Ì¬±äÁ¿µÄÎÊÌâ


´úÂëÈçÏ£º
<?php
class Book{
    static $num=0;
    public function showme(){
        echo 'ÄúÊǵÚ'.self::$num.'λ·Ã¿Í';
        self::$num++;
    
    }
}
$book1 = new Book();
$book1->showme();
echo"<br>";
$book2=new Book();
$book2->showme();
echo "<br>";
echo 'ÄúÊǵÚ'.Book::$num.'λ·Ã¿Í';
?>
½á¹ûÊÇ£º
ÄúÊǵÚ0λ·Ã¿Í
ÄúÊǵÚ1λ·Ã¿Í
ÄúÊǵÚ2λ·Ã¿Í
Èç¹û¸Äµôstatic ±ä³É public ÄÇôΪʲô»á³öÏÖ´íÎó£ºFatal error: Access to undeclared static property: Book::$num
ËäÈ»Book::$numÊǵ÷ÓõÄÀàÄÚ²¿±äÁ¿£¬¿ÉÊÇÈç¹ûÎÒÓÃÁËpublic²»ÊÇÄĶ¼ÄÜ·ÃÎʵĵ½Ã´£¿
ÄѵÀ Book::$num ±ØÐëÊǾ²Ì¬±äÁ¿£¿
Ôõô»ØÊ£¿
¾²Ì¬±äÁ¿²»ÓÃʵÀý»¯¶ÔÏ󣬵±ÀÛµÚÒ»´Î±»¼ÓÔØʱ¾ÍÒѾ­·ÖÅäÁËÄÚ´æµ¥Ôª¡£
Õâ¾ä»°£¬Èç¹ûÊÊÓ¦µ½Õâ¸ö³ÌÐòµÄ»°£¬ÊDz»ÊÇclass Book{
    static $num=0;
    public function showme(){
        echo 'ÄúÊǵÚ'.self::$num.'λ·Ã¿Í';
        self::$num++;
    
    }
}
ÕâʱÒѾ­±»·ÖÅäÁËÄÚ´æÁËÄØ£¿


Ïà¹ØÎĵµ£º

phpµÄ°²×°Óëµ÷ÊÔ

1.°Ñ½âѹµÄphp-5.2.6-Win32.zipÖØÃüÃûΪphp5¡£²¢¸´ÖƵ½DÅÌĿ¼Ï¡£¼´°²×°Â·¾¶Îª D:\php5
2.ÕÒµ½phpĿ¼Ï嵀 php.ini-dist»ò php.ini.recommendedÎļþ£¬ÖØÃüÃûΪ php.ini
3.ÔÙ°ÑphpĿ¼ÏµÄphp5ts.dll,libmysql.dll¸´ÖƵ½Ä¿Â¼ c:\windows\system32Ï¡£
4.°Ñphp5\extĿ¼ÏµÄphp_gd2.dll,php_mysql.dll,php_mbstring.dllÎ ......

(PHP)CRUDÀ༰·ÖÒ³Àà

֮ǰдµÄcrudÀàʵÔڱȽϼòµ¥£¨http://blog.csdn.net/yycai/archive/2009/12/15/5012353.aspx£©£¬ÖØзâ×°ÁËһϣº
<?php
/**
* ×Ô¶¯»¯Êý¾Ý±í²Ù×÷Àà
* @example
* <code>
* $db = cls_crud::factory(array('table'=>'article'));
* $data = $db->get_block_list(array('category_id' => 3), ......

PHPµÄCRUDÀà

ÒòΪÏîÄ¿ÐèÒª£¬ËùÒÔ×Ô¼ºÐ´ÁËÒ»¸öCRUDÀà
ËäÈ»»¹±È½Ï¼òµ¥£¬²»¹ý¸Ð¾õºÜʵÓá£
×¢£ºcls_databaseÊÇÒ»¸öÊý¾Ý¿â²Ù×÷Àà
¼û£ºhttp://code.google.com/p/cyy0523xc/source/browse/trunk/php/cls_crud.php
<?php
/**
* ×Ô¶¯»¯Êý¾Ý±í²Ù×÷Àà
* @author С²Ì <cyy0523xc@gmail.com>
* @version 1.0
*/
class cls_ ......

linuxÏ°²×°PHP APACHE MYSQL ÊÖ¼Ç

/**********************************
APACHE
***********************************/
±à¼­²ÎÊý£º
./configure" \
"--prefix=/usr/local/apache" \
"--enable-so" \
"--enable-ssl" \
"--enable-mods-shared=most" \
"--with-mpm=event" \
"--with-ssl=/usr/local/openssl" \
"--enable-cache" \
"--enable-mem- ......

PHPµ¥Ë«ÒýºÅµÄÎÊÌâ

»ù´¡ÎÊÌâ:
×î½ü±»µ¥Ë«ÒýºÅÀ§ÈÅ×Å£¬²»ÖªµÀʲôʱºòÓÃË«ÒýºÅ£¬Ê²Ã´Ê±ºòÓõ¥ÒýºÅ¡£×ܽáÇø·ÖÒ»ÏÂ
Ôڴ󲿷ÝÓïÑÔÖУ¬ÒýºÅÒýÆðÀ´µÄÄÚÈݶ¼±íʾΪ×Ö·û¡£
ÀýÈ磺
      <a href="µØÖ·">Á´½Ó</a>
      echo "×Ö·û´®";
      print("×Ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ