ÐÂѧ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 ......
index.phpÄÚÈÝ£º
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
±±¾©2ÄêPHP¾ÑéÇó¼æÖ°
½Ó·Ö
·¹ý½Ó·Ö£¡.¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
jf~~~~~~~~~~~~~~Ö§³Ö
ßÀ¡£¡£ÎÒÃÇÐèÒª¼æÖ°£¬¿ÉÊÇÔõôÁªÏµÄãѽ£¿
¶¥¡£¡£¡£ »Ø¸´ÄÚÈÝ »Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡
º¼ÖÝÄãÈ¥²»È¥°¡ ¡£¡£¡£¡£¡ ......
¾ÍÊÇÎÒÔÚij¸öÍøÒ³²åÈëÁËÒ»¸öphpÁ´½Ó
ÎÒÏë»ñµÃÄǸöÍøÖ·µØÖ·µØÖ·À¸µÄurl¶øÇÒÒªÊä³ötxt¸ñʽ»òÆäËû¸ñʽ¡£Ó¦¸ÃÈçºÎʵÏÖ£¿£¿£¿
»¹ÓоÍÊÇдÈëµ½.txt ÎļþÀÔõôȥÅжÏÊÇ·ñÖظ´¡£
$_sever[request_uri]
Â¥Ö÷¸øµã·Ö ......
PHPÀïÃ棬ÎÒµÄ±íµ¥Ã»ÓÐÌîдֵ£¬Ò²Ã»ÓÐÌá½»£¬ÕÕÀí˵isset²»³öÓÐÖµ¡£
ÎÒдµÄisset²éµ½ÓÐÖµ£¬µ«ÊÇechoһϣ¬¾ÍNotice: Undefined index: page in ÁË¡¡Ôõô»ØÊ°¡£¿
if(isset($_POST['page']))
{
echo $_POST['pa ......