PHP½Ì³Ì ³õѧÕ߱ؿ´µÄPHP´úÂë
¾µäÑ»·Àý×Ó
<HTML>
<HEAD>
<TITLE>¾µäÑ»·Àý×Ó</TITLE>
</HEAD>
<BODY>
<?
for($counter = 1; $counter <= 6; $counter++)
//Ñ»·6´Î
{
print("<B>counter is
$counter</B><BR>\n"); //´òÓ¡6´Î
}
?>
</BODY>
</HTML>
forµÄ¸ß¼¶ÔËÓÃ
<HTML>
<HEAD>
<TITLE>forµÄ¸ß¼¶ÔËÓÃ</TITLE>
</HEAD>
<BODY>
<?
/*
** ´òÓ¡±ØÒªµÄ˵Ã÷ÎÄ×Ö
*/
print("<B>¾àÀëÐÇÆÚÒ»»¹Óм¸Ì죿</B>\n");
print("<OL>\n");
for($currentDate = date("U");
//¶¨Òå$currentDateʱ¼ä¸ñʽ
date("l", $currentDate) !=
"Monday"; //ÅжÏÊDz»Êǵ±Ç°ÏµÍ³Ê±¼äÊÇMonday
$currentDate += (60 * 60 * 24))
//µ±Ç°Ê±¼ä¼ÓÉÏ1Ìì
{
/*
** ´òӡʱ¼äÃû³Æ
*/
print("<LI>" .
date("l", $currentDate) . "\n");
}
print("</OL>\n");
?>
</BODY>
</HTML>
º¯ÊýµÄ¼òµ¥µ÷ÓÃ:
<HTML>
<HEAD>
<TITLE>¼òµ¥µÄº¯Êý</TITLE>
</HEAD>
<BODY>
<FONT SIZE=5>
<?
function printBold($inputText)
//¶¨Òåfunction
printBold£¨£©
{
print("<B>" . $inputText
. "</B>"); ////´òÓ¡$inputText
}
print("ÕâÐÐûÓмÓÖØ£¡<BR>\n");
&n
Ïà¹ØÎĵµ£º
±¾ÎÄת×ÔÎҵIJ©¿Í£º(my.unix-center.net/~xiaoshe)
http://my.unix-center.net/~xiaoshe/2010/04/19/%E4%B8%80%E4%B8%AA%E8%B6%85%E7%BA%A7%E7%AE%80%E5%8D%95%E7%9A%84php%E6%8A%95%E7%A5%A8%E7%B3%BB%E7%BB%9F%EF%BC%8C%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/
´ÓÍøÉÏ·¢ÏÖµÄÒ»¸ö³¬¼¶¼òµ¥µÄ»ùÓÚphpµÄͶ ......
$_SERVER['PHP_SELF'] #µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£
$_SERVER['argv'] #´«µÝ¸ø¸Ã½Å±¾µÄ²ÎÊý¡£
$_SERVER['argc'] #°üº¬´«µÝ¸ø³ÌÐòµÄÃüÁîÐвÎÊýµÄ¸öÊý£¨Èç¹ûÔËÐÐÔÚÃüÁîÐÐģʽ£©¡£
$_SERVER['GATEWAY_INTERFACE'] #·þÎñÆ÷ʹÓÃµÄ CGI ¹æ·¶µÄ°æ±¾¡£ÀýÈ磬“CGI/1.1”¡£
$_SERVER['SERVER_ ......
²»¹ýÕâ¸ö²»ÄܺͷÉÐÅ¿Í»§¶ËͬʱµÇ¼£¬¶þÕßÖ»ÄܵÇÒ»¸ö£¬Ö»Òª´úÂëÔÚdwÀï´ò¿ª£¬¿Í»§¶Ë¾ÍµôÁ˺ǺÇ~~~
<?php
/*
* Created on 2010-4-18
* MiaoPengFei
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$data["username"] = ;//ÕâÀïÌ ......
PHP×÷ΪÓŵãºÍȱµã¶¼·Ç³£Í»³öµÄ±à³ÌÓïÑÔ£¬ÊÇ·ñÍƳçʹÓÿò¼Ü£¬ÖÁ½ñÈÔ´æÓÐÒìÒ顣Ȼ¶øÔÚÕâ¸ö×·Çó¾¼ÃЧÒæ×î´ó»¯µÄ½ñÌ죬½µµÍÈí¼þ¿ª·¢³É±¾£¬Ëõ¶Ì¿ª·¢Ê±¼ä£¬ÒѳÉΪ±ØȻ֮ÊÆ£¬PHP³ÌÐò¿ª·¢Ê¹Óÿò¼ÜÒ²¾Í˳Àí³ÉÕ¡£
ÁзòÍжû˹̩Ôø˵£º“ÐÒ¸£µÄ¼ÒÍ¥ÊÇÏàËƵģ¬²»ÐҵļÒÍ¥¸÷Óи÷µÄ²»ÐÒ”¡ ......