Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÖеÄMVC±à³ÌÖ®MVC¿ò¼Ü¼ò½é

¡¾Ê²Ã´ÊÇMVC£¿¡¿
        MVCÊÇÒ»¸ö¿ÉÒÔÈÃÄã°Ñ“Èý¸ö²¿·Ö£¨¼´MVCµÄÈ«³Æ£¬Model¡¢ View¡¢Controller£©”гµ÷µØ×é³ÉÒ»¸ö¸´ÔÓÓ¦ÓóÌÐòµÄ¸ÅÄî¡£Ò»Á¾Æû³µ¾ÍÊÇÒ»¸öÔÚÏÖʵÉú»îÖзdz£ºÃµÄMVCÀý×Ó¡£ÎÒÃÇ¿´³µ¶¼¿´Á½¸öView£¨ÏÔ Ê¾£©²¿·Ö£ºÄÚ²¿ºÍÍⲿ¡£¶øÕâÁ½¸ö¶¼Àë²»¿ªÒ»¸öController£ ......

php °²È«

ÈçºÎ²»Ê¹ÓÃprepared statment£¬¶øÊÇÓùýÂ˵ķ½·¨±ÜÃâSQL×¢ÈëÄØ£¿
Ò»°ãÀ´Ëµmysql×Ô´øµÄ¹ýÂ˺¯ÊýÊDZȽϿɿ¿µÄ¡£mysql_real_escape_string()
µ«ÊÇÕâ¸öº¯ÊýÔÚijЩ×Ö·û¼¯ÖÐÓÐÎÊÌ⣬±ÈÈçGBK¡£Èç¹ûÄãÓÃUTF8ÄÇû¹Øϵ¡£
ÔÚPHPÀïÉèÖÃÊý¾Ý¿âµÄ×Ö·û¼¯²»Ó¦¸ÃÓãºmysql_query("SET NAMES UTF8");
¶øÓ¦¸ÃÓãºmysql_set_charset()
ÕâÑù ......

PHPÊý¾ÝÀàÐÍת»»Ï¸½Ú

PHPÊý¾ÝÀàÐÍת»»Ï¸½Ú
1¡¢Êý×Ö£¨ÕûÐκ͸¡µãÐÍÖ®¼ä¿ÉÒÔÏ໥ת»¯£©
ÕûÐÎת»»Îª¸¡µãÐÍ£ºÓÉÓÚ¸¡µãÐ͵ľ«¶È·¶Î§Ô¶´óÓÚÕûÐΣ¬ËùÒÔת»»ºóµÄÊýÖµ¾«¶È²»»á¸Ä±ä¡£
¸¡µãÐÍת»»ÎªÕûÐΣº½²×Ô¶¯ÉáÆúСÊ÷²¿·Ö£¬Ö»±£ÁôÕûÊý²¿·Ö¡£×¢£ºÈç¹ûÒ»¸ö¸¡µãÐͳ¬¹ýÕûÊýÈ¡ÖµµÄÓÐЧ·¶Î§£¬Æä½á¹û½«ÊÇÎÞ·¨È·¶¨µÄ£¨ÕûÊýµÄ×î´óÖµÔ¼ÊÇ2.147e9£©¡£
¡¾Ê¾Àý¡ ......

PHPÊý¾ÝÀàÐÍת»»

PHPÊý¾ÝÀàÐÍת»»
PHPµÄÊý¾ÝÀàÐÍת»»ÊôÓÚÇ¿ÖÆת»»£¬ÔÊÐíת»»µÄPHPÊý¾ÝÀàÐÍÓУº
£¨int£©¡¢£¨integer£©£º×ª»»³ÉÕûÐÎ
£¨float£©¡¢£¨double£©¡¢£¨real£©£º×ª»»³É¸¡µãÐÍ
£¨string£©£º×ª»»³É×Ö·û´®
£¨bool£©¡¢£¨boolean£©£º×ª»»³É²¼¶ûÀàÐÍ
£¨array£©£º×ª»»³ÉÊý×é
£¨object£©£º×ª»»³É¶ÔÏó
PHPÊý¾ÝÀàÐÍÓÐÈýÖÖת»»·½Ê½£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ