¡¡¡¡ }
print("ÕâÐÐûÓмÓÖØ£¡£¡£¡<BR>\n"); //Ö±½Ó´òÓ¡×Ö·û´®
print(makeBold("ÕâÐб»¼ÓÖØÁË£¡£¡£¡") . "<BR>\n");//µ÷ÓÃfunction makeBold()º¯Êý
print("ÕâÐÐûÓмÓÖØ£¡£¡£¡<BR>\n"); //Ö±½Ó´òÓ¡×Ö·û´®
?>
</SIZE>
</BODY>
</HTML>
ÓÐĬÈϲÎÊýµÄº¯Êý
<HTML>
<HEAD>
<TITLE>ÓÐĬÈϲÎÊýµÄº¯Êý</TITLE>
</HEAD>
<BODY>
<FONT SIZE=5>
<?
function printColored($Text, $Color="black") //¶¨Òåfunctionº¯Êý
{
print("<FONT COLOR=\"$Color\">$Text</FONT>"); //»ñÈ¡×Ö·û´®µÄÄÚÈݺÍÑÕÉ«
}
printColored("ÕâÊǺÚÑÕÉ«µÄ×Ö£¡"); //µ÷ÓÃfunctionº¯Êý
print("<BR><BR>\n");
printColored("ÕâÊÇÀ¶ÑÕÉ«µÄ×Ö£¡", "blue"); //µ÷ÓÃfunctionº¯Êý
print("<BR>\n");
?>
</SIZE>
</BODY>
</HTML>
ÓõĹæËã·¨ÅжÏÊÇ·ñÊÇÕûÊý
<HTML>
<HEAD>
<TITLE>ÅжÏÕûÊý</TITLE>
</HEAD>
<BODY>
<?
function checkInteger($Number)
{
if($Number > 1)
{
/* ÕûÊý¼õ1ÈÔÈ»ÊÇÕûÊý */
return(checkInteger($Number-1));
}
elseif($Number < 0)
{
/* ¶ÔÓÚÒ»¸ö¸ºÊý£¬*/
/* ¿ÉÒÔ·ÖÎöËüµÄ¾ø¶ÔÖµ*/
return(checkInteger((-1)*$Number-1));//È¡¾ø¶ÔÖµ£¬°Ñ¸ºÊý°´ÕûÊý·ÖÎö
}
else
{
if(($Number > 0) AND ($Number < 1))
{
return("µ±È»²»ÊÇ");
}
else
{
/* 0 ºÍ 1 ÊÇÕûÊý */
/* ¸ù¾ÝÏà¹ØÊýѧ¶¨Òå */
return("ÊǵÄ");