ÐÂѧPHP Çë½ÌÎÊÌâ - PHP / »ù´¡±à³Ì
PHPÖÐ ÉùÃ÷±äÁ¿µÄʱºòÒ»¸ö$¸úÁ½¸ö$µÄÇø±ð
±ÈÈç˵
$var="333"; ±íʾ±äÁ¿ÃûΪ$varµÄ±äÁ¿µÄֵΪ333
$var="myvar";$$var="333";±íʾ±äÁ¿ÃûΪ$myvarµÄ±äÁ¿µÄֵΪ333
ÕâÑù˵Çå³þÁËÂð£¿
Á½¸ö$ÓÐʲôÓÃÄØ£¿£¿
Èç¹ûÊÇÕâÑùµÄ»° Ö»ÓÃÒ»¸ö²»ÊÇÒ²ÐÐÂð
ÕâÑù²»ÊǸüÂé·³
Èç¹û±äÁ¿ÓйØÁªÕâÑù²»ÊǺܷ½±ãÂð
ÕâÒ²ÊÇÓкô¦µÄÈç¹û±äÁ¿ÊǶ¯Ì¬µÄ£¬ÕâÑù¾Í¿ÉÒÔ¶¯Ì¬µÄʹÓñäÁ¿µÄÖµ~
PHP code:
$name = 'Join';
$$name = 25;
echo $Join; // 25
Á½¸ö $$ ¾ÍÊDZäÁ¿µÄ±äÁ¿
$a='b';
$b==$$a
Ã÷°×ÁË¡£
Ïà¹ØÎÊ´ð£º
1.¾«Í¨ÃæÏò¶ÔÏóµÄÉè¼ÆºÍ¿ª·¢£»
2.ÊìÁ·Ê¹ÓÃPHPÓïÑÔ(5.0+)½øÐÐÊý¾Ý¿â£¬ÍøÂçͨÐÅ£¬Îļþ¶Áд£¬°²È«»úÖƵȿª·¢£»
3.ÊìÁ·Ê¹ÓÃMYSQL(5.0+)Êý¾Ý¿â¿ª·¢£¬°üÀ¨»ù±¾µÄÊý¾Ý¿âÉè¼Æ/ÓÅ»¯/°²È«£¬¸´ÔÓµÄT-SQLÓï¾ä±àд£¬ÊìÁ·±àдMYS ......
Ôڲɼ¯Ò»¸öÒ³ÃæµÄʱºòͨ³£¶¼ÊÇʹÓÃfile_get_contents($url)
²»¹ý·µ»ØµÄ½á¹ûÓÐʱºò»á²»È«
Èç¹ûÔÚhtmlÖÐʹÓà document.ready,ÔÚÒ³Ãæ×¼±¸ºÃºó£¬Ê¹ÓÃajax¶ÁÈ¡±ðÒ»²¿·ÖµÄÊý¾Ý
ÔÙͨ¹ýÐÞ¸Ähtml±êÇ©µÄÄÚÈÝ£¬¾Í²¿·ÖµÄÊý¾Ý¾ ......
index.phpÄÚÈÝ£º
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
²ËÄñÇó¾È£¡£¡
ÏÖÔÚÎÒÊÖÍ·ÓÐÒ»¸öphp+oracleµÄÍøÕ¾¡£¡£·þÎñÆ÷ÊÇlinuxϵͳ
Çë¸÷λ¸æËßÎÒÈçºÎ·¢²¼¡£¡£¡£ÎÒÊÇÐÂÊÖ¡£Ð»Ð»ÁË£¡£¡
°²×°Ò»¸öapache£¬°ÑphpÎļþ·Åµ½apacheµÄ·¢²¼Ä¿Â¼Ï£¬ ......
1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......