PHPÈÕ³£¿ª·¢Ð¡¼¼ÇÉ
PHPÅúÁ¿È¡µÃcheckboxµÄÖµ
1¡¢ÃüÃû
<input type='checkbox' name='checkbox[]' value=$dwmyrow[banzhu] />
2¡¢Ê¹ÓÃ
µ±¼Æ»®µ±×÷sqlÖ¸ÁîµÄÒ»²¿·Öʱ£ºÈç¹û²ÎÓë¿ØÖÆµÄ×Ö¶ÎÊÇÊýÖµÐ͵ģ¬Ôò
if(! empty($_POST['checkbox'])) {
$expr = join(",", $_POST['checkbox']);
$sql = "select * from tbl_name where field in ($expr)";
}
Èç¹û²ÎÓë¿ØÖÆµÄ×Ö¶ÎÊÇÊýÖµÐ͵ģ¬Ôò
if(! empty($_POST['checkbox'])) {
$expr = "'".join("','", $_POST['checkbox']).".";
$sql = "select * from tbl_name where field in ($expr)";
}
PHPÅжÏForm±íµ¥ÊÇ·ñÌá½»
$action=$HTTP_POST_VARS["Button1"];
if($action=="Ìá½»")
{
//Ö´ÐÐ±íµ¥²Ù×÷
}
else
{
//¶ÁȡĬÈÏÖµ
}
PHP »ñÈ¡×Ö·û´®³¤¶È
strlen($myrow[1])
PHP UrlתÏò
Header("Location: ".$_SERVER["HTTP_REFERER"]);
PHP³¬È«¾Ö¶ÔÏó
<?php
$a = 1;
$b = 2;
function Sum()
{
$GLOBALS["b"] = $GLOBALS["a"] $GLOBALS["b"];
}
Sum();
echo $b;
?>
PHP ±íµ¥È¡Öµ
Èç¹û mothod="get" ¾ÍÓà $_GET["test"] ´úÌæ$test
Èç¹û mothod="post" ¾ÍÓà $_POST["test"] ´úÌæ$test
PHPÈ¡µÃµ±Ç°IP
<?=$HTTP_SERVER_VARS["REMOTE_ADDR"]?>
PHP È¡µÃµ±Ç°Ê±¼ä
<?php
echo date("Y-m-d G:i:s");
?>
date("YÄêmÔÂdÈÕ")
Date ("Y-n-j")
Ïà¹ØÎĵµ£º
±¾ÎÄת×Ô"PHP°®ºÃÕß"£ºhttp://www.phpfans.org/?cat=1
Ò»°ãÓõ½“ÒýÇæ”Á½×Ö¶¼»á¸Ð¾õ±È½Ï¸ß¼¶£¬"Ä£°åÒýÇæ"ÕâËĸö×ÖÌýÆðÀ´ºÜ¸ßÉîµÄÑù×Ó£¬ÀàËÆÓÎÏ·3DÒýÇæ¡¢ZendÒýÇæµÈ£¬Æäʵ¶¼ÊÇ»£È˵쬯ÍâÐÐÈ˵ġ£ËùÒÔÔÚÎÒ³õѧPHPµÄÄǻᣬҲÒòΪÕâËĸö×Öµ¼ÖÂÁËÎÒ¾õµÃºÜÄѶøÃ»ÓÐÈ¥¿´Ëûµ½µ×ÊÇʲôÑùÒ»¸ö¶«Î÷£¬Ö±µ½ºÜ³¤Ê±¼äÒÔºóÊ¹Ó ......
°æ±¾£ºapache_2.2.6-win32-x86-no_ssl
Ö±½Ó°´Ä¬Èϰ²×°£¬°²×°Ê±Òª¹Ø±Õä¯ÀÀÆ÷¸úÏÂÔØÈí¼þ£¬·ñÔò°²×°Íê³Éºó·þÎñÆ÷²»ÄÜÆô¶¯£¬±¨²»Äܰó¶¨80¶Ë¿ÚµÄ´íÎ󡣯ô¶¯ºóÔÚµØÖ·À¸ÖÐÊäÈë“http://localcast/”»ò“http://127.0.0.1/”£¬Èç¹û¿ÉÒÔ¿´µ½"It Works"£¬ËµÃ÷°²×°³É¹¦¡£
Èç¹ûÐèÒª¸ü¸ÄĬÈÏ·¾¶£¬´ò¿ª“C:\P ......
1¡¢PHP4ÒÔºó»ñÈ¡´«ÖµµÄ·½·¨
Ò»°ãÔÚÒ³ÃæÖд«Öµ³£¼ûµÄÊÇPOST¡¢GETºÍCOOKIE¼¸ÖÖ£¬ËùÒÔÏÂÃæÎÒÒ²Ö÷Òª½éÉÜÕ⼸ÖÖ¡£PHP4ÒÔºó¶¼²ÉÓõÄÊÇ$_POST¡¢$_GETµÈÊý×éÀ´»ñÈ¡ÍøÒ³´«Öµ¡£ÔÚPHP3.0¼°ÒÔϰ汾¶¼ÊÇÓõÄÊÇ$HTTP_POST_VARS¡¢$HTTP_GET_VARSµÈÊý×飬¾ßÌå´úÂëÈçÏÂ
echo $_POST['dopost'];
?>
< form action="weste_net.php" ......
¶ÔÓڽű¾°²È«Õâ¸ö»°ÌâºÃÏñÓÀԶûÍêûÁË£¬Èç¹ûÄã¾³£µ½¹úÍâµÄ¸÷ÖÖ¸÷ÑùµÄbugtraqÉÏ£¬Äã»á·¢ÏÖÓÐÒ»°ëÒÔÉ϶¼ºÍ½Å±¾Ïà¹Ø£¬ÖîÈçSQL
injection£¬XSS£¬Path Disclosure£¬Remote commands executionÕâÑùµÄ×ÖÑ۱ȱȽÔÊÇ£¬ÎÒÃÇ¿´ÁËÖ®ºóµÄÓÃ;ÄѵÀ½ö½öÊÇ×¥È⼦?¶ÔÓÚÎÒÃÇÏë×öweb°²È«µÄÈËÀ´Ëµ£¬×îºÃ¾ÍÊÇÄÃÀ´Ñ§Ï°
£¬¿ÉÊÇÍòÎï×¥¸ùÔ´£¬ÎÒà ......