PHPÖÐforeachÑ»·±éÀúÊý×é
<?php
//ÉùÃ÷Êý×é±äÁ¿
$arr = array('ÕÅÈý','ÀîËÄ','ÍõÎå','ÀîÃ÷');
//foreachÑ»·±éÀúÊý×é
foreach($arr as $key => $value){
//×¢Òâ“$value”ºó±ØÐëÒªÒ»¸ö¿Õ¸ñ£¬·ñÔòÊä³öµÄ½á¹û²»ÕýÈ·
echo "Öµ$value µÄϱêΪ$key<br/>";
}
?>
Ïà¹ØÎĵµ£º
<!--<?php
<!--
EOT;
if($yy_en_lang==1){
echo <<<EOT
-->
<a href="$index_e_url">English</a>
<!--
EOT;
}
echo <<<EOT
-->
?>
ÕâÊÇÒ»¶ÎSmartyÄ£°å´úÂ룬¿ÉÊÇÎÒ¿´²»¶®Õâ¸ö¹æÔòÇë¸ßÊÖÖ¸µãһϰ¡£¡£¡Ð»Ð»!
»òÕß ......
setcookie("cookiename","cookievalue",time()+3600,"/path",".php100.com",1);
cookiename:
ÊÇcookieµÄÃû×Ö£¬¿ÉÒÔͨ¹ýcookienameµ÷ÓôËcookie£¬$_COOKIE["cookiename"]£»
cookievalue:
ÊÇcookieµÄ³õʼֵ£»
time():
·µ»ØUNIXʱ¼ä´Á£¬¼´´Ó1970Äê1ÔÂ1ÈÕ£¨UTC/GMT ......
[php]
<?php
--------------------------------------------------------------------
//FileName:class.php
//Summary: AccessÊý¾Ý¿â²Ù×÷Àà
//Author: forest
//CreateTime: 2006-8-10
//LastModifed:
//copyright (c)2006
//http://freeweb.nyist.net/~chairy
//cha ......
Ê×ÏÈ˵×î¸ù±¾µÄ½â¾ö·½·¨£º
ÊÖ »ú·ÃÎÊʱ£¬»á¸½´ø·¢ËÍuser-agentÐÅÏ¢£¬Õâ¸öÐÅÏ¢ÀïÃæ»áÓÐÊÖ»úºÅÂëÐÅÏ¢£¬ÄÇôÈç¹ûÄÜÈ¡µÃÊÖ»úºÅÂ룬Ôò¿ÉÒԿ϶¨ÊÇͨ¹ýÊÖ»úwap·ÃÎʵġ£µ«ÊÇÄ¿Ç°ÖÐ ¹úÒƶ¯ÒѾÆÁ±ÎÁËuser-agentÐÅÏ¢£¬ËùÒÔ»ñÈ¡²»µ½ÊÖ»úºÅÂë¡£ÓйØϵµÄÅóÓÑ¿ÉÒÔÁªÏµÒƶ¯¹«Ë¾£¬°ÑwapÍøÕ¾·þÎñÆ÷µÄipÌá½»¸øÖйúÒƶ¯£¬¼ÓÈë°×Ãûµ¥ ºó¼´¿ÉÈ¡µ ......