PHP¶¯Ì¬ÍøÕ¾¿ª·¢Öг£ÓõÄ8¸öС¼¼ÇÉ
PHPÊÇÒ»ÖÖÓÃÓÚ´´½¨¶¯Ì¬WEBÒ³ÃæµÄ·þÎñ¶Ë½Å±¾ÓïÑÔ¡£ÈçͬASPºÍColdFusion£¬Óû§¿ÉÒÔ»ìºÏʹÓÃPHPºÍHTML±àдWEBÒ³Ã棬µ±·ÃÎÊÕßä¯ÀÀµ½¸ÃÒ³Ãæʱ£¬·þÎñ¶Ë»áÊ×ÏȶÔÒ³ÃæÖеÄPHPÃüÁî½øÐд¦Àí£¬È»ºó°Ñ´¦ÀíºóµÄ½á¹ûÁ¬Í¬HTMLÄÚÈÝÒ»Æð´«Ë͵½·ÃÎʶ˵Ää¯ÀÀÆ÷¡£µ«ÊÇÓëASP»ò
ColdFusion²»Í¬£¬PHPÊÇÒ»ÖÖÔ´´úÂ뿪·Å³ÌÐò£¬ÓµÓкܺõĿçƽ̨¼æÈÝÐÔ¡£Óû§¿ÉÒÔÔÚWindows
NTϵͳÒÔ¼°Ðí¶à°æ±¾µÄUnixϵͳÉÏÔËÐÐPHP£¬¶øÇÒ¿ÉÒÔ½«PHP×÷ΪApache·þÎñÆ÷µÄÄÚÖÃÄ£¿é»òCGI³ÌÐòÔËÐС£±¾ÎÄ×ܽáÁËPHPÈÕ³£¿ª·¢Öг£ÓõÄ8¸öС¼¼ÇÉ¡£
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)";
}
3¡¢PHPÅжÏForm±íµ¥ÊÇ·ñÌá½»
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
$action=$HTTP_POST_VARS["Button1"];
if($action=="Ìá½»")
{
//Ö´ÐÐ±íµ¥²Ù×÷
}
else
{
//¶ÁȡĬÈÏÖµ
}
4¡¢PHP »ñÈ¡×Ö·û´®³¤¶È
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
strlen($myrow[1])
PHP UrlתÏò
Header("Location: ".$_SERVER["HTTP_REFERER"]);
5¡¢PHP³¬È«¾Ö¶ÔÏó
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
£¼?php
$a = 1;
$b = 2;
function Sum()
{
$GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"];
}
Sum();
echo $b;
?£¾
6¡¢PHP ±íµ¥È¡Öµ
Èç¹û mothod="get"
¾ÍÓà $_GET["test"] ´úÌæ$test
Èç¹û mothod="post" ¾ÍÓà $_POST["test"]
´úÌæ$test
7¡¢PHPÈ¡µÃµ±Ç°IP
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
£¼?=$HTTP_SERVER_VARS["REMOTE_ADDR"]?£¾
8¡¢PHP È¡µÃµ±Ç°Ê±¼ä
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
£¼?php
echo date("Y-m-d G:i:s");
?£¾
date("YÄêmÔÂdÈÕ")
Date ("Y-n-j")
Ïà¹ØÎĵµ£º
ÔÚPHPÖÐʹÓÃÍ·Îļþ£¬»áÉæ¼°Á½¸öº¯Êý£ºinclude()ºÍrequire()¡£ÕâÁ½¸öº¯Êý²î±ðºÜС£¬È´ºÜÖØÒª£¬ËùÒÔÎÒÃÇÒªÈÏÕæÑо¿Ò»Ï¡£
require()º¯Êý¹¤×÷·½Ê½ÓëXSSIÏàÀàËÆ£»²»¹ÜÔÚ³ÌÐòµÄÄĸö²¿·ÖʹÓÃÁËÕâ¸öº¯Êý£¬Ö»ÓгÌÐòÒ»¿ªÊ¼ÔËÐУ¬Í·ÎļþµÄÄÚÈݾͱ»×÷Ϊ³ÌÐò±¾ÉíµÄÒ»²¿·ÖÀ´´¦
Àí¡£Òò´Ë£¬Èç¹ûÄúÔÚÒ»¸öÌõ¼þÅж¨Óï¾äÖÐʹÓÃÁËrequire()º¯Ê ......
Ò» Éè¼Æ¹¤¾ß
UML ºÍÏà¹ØÉè¼Æ¹¤¾ß
- Argo UML
UML»æͼ¹¤¾ß£¬Ö§³ÖPHP stubÉú³É¡£ (commercial spin off is Posideon) –Java±àд¡£
- Umbrello UML
UML»æͼ¹¤¾ß£¬Ö§³ÖPHP stubÉú³É¡£ ÐèÒªUnix / KDE¡£
- Dia
Ö§³ÖUML µÄ»æͼ¹¤¾ß -ʹÓÃAutoDia Éú³ÉPHP¡£
- XMI 2 PHP
´ÓXMIÎĵµÉú³ÉPHP´úÂ룬ÓÃXMLÃèÊöU ......
½ñÌì2010-02-26£¬¿ªÊ¼ÎÒµÄphpѧϰ֮·£¬
¼Æ»®ÔÚδÀ´µÄÒ»¶Îʱ¼äÄÚ£¬ÓÃ×ã¹»¶àµÄʱ¼äºÍ¾«Á¦À´Ñ§Ï°Á˽âphp¡£
×öµ½¾«Í¨Àí½â»¹ÓоÍÊÇ×Ô¼º¶ÀÁ¢µÄ¿ª·¢³öһϵÁеÄÍøÕ¾£¬×÷Ϊ¶Ô×Ô¼ºÑ§Ï°µÄ¼ìÑé¡£
×öºÃ¼¼Êõ×ܽáºÍ¼¼ÊõÄÚºËÀí½â ......
<?php
//--------------------
// »ù±¾Êý¾Ý½á¹¹
//--------------------
//¶þ·Ö²éÕÒ£¨Êý×éÀï²éÕÒij¸öÔªËØ£©
function bin_sch($arr, $low, $high, $k) {
if($low<=$high) {
$mid = intval(($low+$high)/2);
if($arr[$mid] == $k) {
return $mid;
} elseif($k<$ ......