PHP ¾Å¾Å³Ë·¨±í
¿ÉÒÔ¼òµ¥µÄÓÐÁ½¸öforÑ»·±íʾ ¾Å¾Å³Ë·¨±í,µ«ÊDz¢²»ÖªµÀÈçºÎ½øÐÐURLµÄÉèÖÃ.
<?php
for($a =1;$a<=9;$a++)
{
for($b =1;$b<=$a;$b++)
{$c =$a *$b;
echo "$a*$b=$c ";
}
echo "<p>";
}
?>
Ïà¹ØÎĵµ£º
PHP Ϊʲôfunction ÔÚÉùÃ÷ʱûÓÐÉùÃ÷²ÎÊý,¶øµ÷ÓÃʱ¼ÓN¸ö²ÎÊýÈ´ÊÇÔÊÐíµÄ
2008-11-13 20:14:38 ÆäËû | ÆÀÂÛ(7) | ä¯ÀÀ(721)
ÈçÌâ
//ÉùÃ÷
function test(){};
$a = '';
$b = '';
$c = '';
//µ÷ÓÃ
test($a,$b,$c,1,2,3);
ÏàÐŲ»ÉÙÐֵܽãÃÃÒ²Ôø¾Óöµ½Í¬ÑùµÄÎÊÌâ¡£
why?
¸Õ¿ªÊ¼ÎÒÒ²Í¦Ó ......
Õâ¸öÊÇÓÉasp¶þ¼¶²àÀ²Ëµ¥¸ÄµÄ
<script language="javascript">
// JavaScript Document
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.chil ......
1²éÕÒ×Ö·ûλÖú¯Êý£º
strpos($str,search,[int]):²éÕÒsearchÔÚ$strÖеĵÚÒ»´ÎλÖôÓint¿ªÊ¼£»
stripos($str,search,[int]):º¯Êý·µ»Ø×Ö·û´®ÔÚÁíÒ»¸ö×Ö·û´®ÖеÚÒ»´Î³öÏÖµÄλÖ᣸ú¯Êý¶Ô´óСд²»Ãô¸Ð
strrpos($str,search,[int]):²éÕÒsearchÔÚ$strÖеÄ×îºóÒ»´Î³öÏÖµÄλÖôÓint
2¡¢ÌáÈ¡×Ó×Ö·ûº¯Êý£¨Ë«×Ö½Ú£©
subm ......
¿ÉÓÃÓÚphpµÄ¼ÆÊýÆ÷ºÍ±íµ¥µÄÌá½»£¬·ÀÖ¹·´¸´Ë¢Ð¡£
¸´ÖÆ´úÂë
<?php
session_start();
$allow_sep = "30000";
if (isset($_SESSION["post_sep"]))
{
if (time() - $_SESSION["post_sep"] < $allow_sep)
{
exit("Çë²»Òª·´¸´Ë¢ÐÂ");
}
else
{
$_SESSION["post_sep"] = time();
}
}
e ......
½ñÌìÊÇÒ»¸öÖµµÃ¼ÍÄîµÄÈÕ×Ó,ÖÕÓڰѱðµÄÊÂÇé¶¼¸ÉµôÁË,¿ÉÒÔÒ»ÐÄÒ»ÒâµÄѧϰÎÒ×î°®µÄPHPÁË,С»¶ºôÒ»ÏÂ.Ò®~~
Ê×ÏÈ.½áºÏ×Ô¼ºµÄ˼¿¼,ÓÐÁ˼¸¸ö¹ØÓÚ1+1=2µÄ±íʾ·½·¨,¾ßÌåÂÞÁÐÈçÏÂ:
Ê×ÏÈÊÇÒ»Öֺܼòµ¥µÄ±íʾ·½·¨:
<?php
$a =1+1;
echo "1+1=".$a;
?>
//ÕâÖÖ·½·¨ÓõIJ¢²»¶à,Ö»ÊÇΪÁ˼ÓÉî¶Ô±äÁ¿ ......