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

PHP±äÁ¿µÄ±äÁ¿

PHP±äÁ¿µÄ±äÁ¿£¬¼´¿É±ä±äÁ¿
      ¿É±ä±äÁ¿µÄ¸ÅÄͨ¹ý»ñÈ¡Ò»¸ö±äÁ¿µÄÖµ×öΪÁíÍâÒ»¸ö±äÁ¿µÄÃû³ÆÀ´²Ù×÷±äÁ¿£¬¾ÍÊÇ¿ÉÒÔ±äÁ¿¡£
¡¾Ê¾Àý¡¿
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<?php   
$a = 'hello';   //ÆÕͨ±äÁ¿   
  
$$a = 'world';  //¿É±ä±äÁ¿ £¬Ï൱ÓÚ $hello='world';   
  
echo "$a $hello";  //Êä³ö£ºhello world   
  
echo $$a;   //Êä³ö£ºworld   
  
echo "$a ${$a}";  //Êä³ö£ºhello world   
  
echo "$a {$$a}";  //Êä³ö£ºhello world   
?>   
<?php
$a = 'hello'; //ÆÕͨ±äÁ¿
$$a = 'world'; //¿É±ä±äÁ¿ £¬Ï൱ÓÚ $hello='world';
echo "$a $hello"; //Êä³ö£ºhello world
echo $$a; //Êä³ö£ºworld
echo "$a ${$a}"; //Êä³ö£ºhello world
echo "$a {$$a}"; //Êä³ö£ºhello world
?>
ÓÐʱºòʹÓÿɱä±äÁ¿ÊǺܷ½±ãµÄ£¬¾ÍÊÇÒ»¸ö¿É±ä±äÁ¿»ñÈ¡ÁËÒ»¸öÆÕͨ±äÁ¿µÄÖµ×÷ΪÕâ¸ö¿É±ä±äÁ¿µÄ±äÁ¿Ãû¡£
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<?php   
$var1="this is var1";   
$var2="this is var2";   
  
$a="var1";   
  
echo $$a; //Êä³ö this is var1   
  
$a="var2";   
  
echo $$a; //Êä³ö this is var2   
  
?>  
<?php
$var1="this is var1";
$var2="this is var2";
$a="var1";
echo $$a; //Êä³ö this is var1
$a="var2";
echo $$a; //Êä³ö this is var2
?>
365PHPÃâ·ÑÊÓƵ½Ì³ÌÏÂÔØ£º  PHP½Ì³ÌÊÓƵ,Ãâ·ÑÊÓƵÏÂÔØ -PHP¼ò½éÓëPHP±äÁ¿ÓëÊý¾ÝÀàÐÍ
×÷ÕߣºÂíÃ÷@PHPÅàѵ PHPÐÞ¶©1.0 2009-09
365PHP£¬ÖйúPHPÔÚÏßÅàѵµÚһƷÅÆ
±¾ÎÄ365PHP°æȨËùÓУ¬Î´¾­Åú׼תÔرؾ¿¡£


Ïà¹ØÎĵµ£º

ubuntu Ï ´î½¨ apache+php+mysql


#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install  mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ­´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......

½²½²phpµÄħÊõ·½·¨

PHP5.0ºó£¬phpÃæÏò¶ÔÏóÌá³É¸ü¶à·½·¨£¬Ê¹µÃphp¸ü¼ÓµÄÇ¿´ó£¡£¡
һЩÔÚPHP½ÐħÊõ·½·¨µÄº¯Êý£¬ÔÚÕâÀï½éÉÜһϣºÆäʵÔÚÒ»°ãµÄÓ¦ÓÃÖУ¬ÎÒÃǶ¼ÐèÒªÓõ½ËûÃÇ£¡£¡
1.__construct() µ±ÊµÀý»¯Ò»¸ö¶ÔÏóµÄʱºò£¬Õâ¸ö¶ÔÏóµÄÕâ¸ö·½·¨Ê×Ïȱ»µ÷Óá£
Java´úÂë
class Test { function __construct() { ec ......

PHP SPL±Ê¼Ç


Õ⼸Ì죬ÎÒÔÚѧϰPHPÓïÑÔÖеÄSPL
¡£
Õâ¸ö¶«Î÷Ó¦¸ÃÊôÓÚPHPÖеĸ߼¶ÄÚÈÝ£¬¿´ÉÏÈ¥ºÜ¸´ÔÓ£¬µ«ÊǷdz£ÓÐÓã¬ËùÒÔÎÒ×öÁ˳¤Æª±Ê¼Ç¡£²»È»¼Ç²»×¡£¬ÒÔºóÒªÓõÄʱºò£¬»¹ÊÇÒª´ÓͷѧÆð¡£
ÓÉÓÚÕâÊǹ©×Ô¼º²Î¿¼µÄ±Ê¼Ç£¬²»Êǽ̳̣¬ËùÒÔдµÃ±È½Ï¼òµ¥£¬Ã»Óжà½âÊÍ¡£µ«ÊÇÎÒÏ룬Èç¹ûÄãÊÇÒ»¸öÊìÁ·µÄPHP5³ÌÐòÔ±£¬Ó¦¸Ã×ãÒÔ¿´¶®ÏÂÃæµÄ²ÄÁÏ£¬¶øÇÒ» ......

PHPÍⲿ±äÁ¿Óë»·¾³±äÁ¿

PHPÍⲿ±äÁ¿Óë»·¾³±äÁ¿
PHPµÄÌصãÖ®Ò»¾ÍÊÇ¿ÉÒÔÓüòµ¥µÄ·½Ê½´¦Àí±íµ¥Êý¾Ý£¬»ñÈ¡»·¾³±äÁ¿¡£ÔÚPHPÖУ¬ÕâЩÍⲿÊý¾Ý»ò±äÁ¿±£´æÔÚÒ»ÖÖÌØÊâµÄÈ«¾Ö±äÁ¿Êý×éÖС£
±íµ¥Êý¾Ý
$_GET£º»ñÈ¡GETÇëÇó·¢Ë͵ÄÊý¾Ý
$_POST£º»ñÈ¡POSTÇëÇó·¢Ë͵ÄÊý¾Ý
$_REQUEST£º¿ÉÒÔͬʱ»ñÈ¡GETºÍPOSTÇëÇó·¢Ë͵ÄÊý¾Ý
¡¾Ê¾Àý¡¿
ÇëÇóURL£ºhttp://localh ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ