Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP »·¾³±äÁ¿

ÔÚPHPÍøÕ¾¿ª·¢ÖУ¬ÎªÁËÂú×ãÍøÕ¾µÄÐèÒª£¬Ê±³£ÐèÒª¶ÔPHP»·¾³±äÁ¿½øÐÐÉèÖúÍÓ¦Óã¬ÔÚÐéÄâÖ÷»ú»·¾³Ï£¬ÓÐʱÎÒÃǸüÐèҪͨ¹ýPHP»·¾³±äÁ¿²Ù×÷º¯ÊýÀ´¶ÔPHP»·¾³±äÁ¿Öµ½øÐÐÉèÖá£Îª´ËÎÒÃÇÓбØÒª¶ÔPHP»·¾³±äÁ¿ÏÈÓÐËùÊìϤ¡£½ñÌìºÍ´ó¼Ò·ÖÏíPHP»·¾³±äÁ¿$_SERVERºÍPHPϵͳ³£Á¿µÄ²¿·ÖÏêϸ˵Ã÷¡£
¡¡¡¡PHP»·¾³±äÁ¿Ö÷ÒªÓÐ$GLOBALS[]¡¢$_SERVER[]¡¢$_GET[]¡¢$_POST[]¡¢$_COOKIE[]¡¢$_FILES[]¡¢$_ENV[]¡¢$_REQUEST[]¡¢$_SESSION[]¡£$_GETºÍ$_POSTÖ÷ÒªÕë¶ÔFORM±íµ¥Ìá½»µÄÊý¾Ý£¬$_COOKIEºÍ$_SESSIONÖ÷ÒªÕë¶Ô¿Í»§¶ËÓÎÀÀÆ÷ºÍ·þÎñÆ÷¶Ë»á»°Êý¾Ý¡£$_FILESÖ÷ÒªÕë¶ÔÎļþÉÏ´«Ê±Ìá½»µÄÊý¾Ý£¬$_REQUESTÖ÷ÒªÕë¶ÔÌá½»±íµ¥ÖÐËùÓÐÇëÇóÊý×飬°üÀ¨$_GET¡¢$_POST¡¢$_COOKIEÖеÄËùÓÐÄÚÈÝ£¬Äã¿ÉÒÔͨ¹ýprint_rº¯Êý·Ö±ðÊä³ö$_REQUEST»òÕß$_COOKIEµÈ½øÐбȽϡ£PHP»·¾³ÈçºÎ´î½¨£¿
PHP»·¾³±äÁ¿$_SERVER
¡¡¡¡ÊÇÒ»¸ö°üº¬·þÎñÆ÷¶ËÏà¹ØÐÅÏ¢µÄPHPÈ«¾Ö»·¾³±äÁ¿£¬ÔÚPHP4.1.0֮ǰµÄ°æ±¾Ê¹ÓÃ$HTTP_SERVER_VARS¡£¸ü¶àÐÅÏ¢¿ÉÒԲο¼ÕâÀï¡£
¡¡¡¡$_SERVER['PHP_SELF'] µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£ÔÚFORM±íµ¥ÖУ¬ÈçÖ´ÐÐÎļþÊDZ¾Éí£¬Äã¿ÉÒÔÔÚACTIONÖÐʹÓÃ$_SERVER['PHP_SELF']£¬ºÃ´¦Êǵ±Ö´ÐÐÎļþÃûÓб䶯ʱ¿ÉÒÔ²»È¥Æµ·±Ìæ»»ACTIONÖеÄÎļþÃû¡£
¡¡¡¡$_SERVER['SERVER_NAME'] µ±Ç°ÔËÐеÄPHP³ÌÐòËùÔÚ·þÎñÆ÷Ö÷»úµÄÃû³Æ¡£
¡¡¡¡$_SERVER['REQUEST_METHOD'] ·ÃÎÊÒ³ÃæʱµÄÇëÇó·½·¨£¬¼´GET¡¢HEAD¡¢POST¡¢PUT¡£
¡¡¡¡$_SERVER['DOCUMENT_ROOT'] µ±Ç°ÔËÐеÄPHP³ÌÐòËùÔÚµÄÎĵµ¸ùĿ¼¡£Ò²¾ÍÊÇPHP.INIÎļþÖеĶ¨Òå¡£
¡¡¡¡$_SERVER['HTTP_REFERER'] Á´½Óµ½µ±Ç°Ò³ÃæµÄÇ°Ò»Ò³ÃæµÄURLµØÖ·¡£ÔÚÒ³ÃæÌøת¹¦ÄÜÖзdz£ÓÐÓá£
¡¡¡¡$_SERVER['REMOTE_ADDR'] ÕýÔÚä¯ÀÀµ±Ç°Ò³Ãæ·ÃÎÊÕßµÄIPµØÖ·¡£
¡¡¡¡$_SERVER['REMOTE_HOST'] ÕýÔÚä¯ÀÀµ±Ç°Ò³ÃæÓû§µÄÖ÷»úÃû¡£
¡¡¡¡$_SERVER['REMOTE_PORT'] ÕýÔÚÓÎÀÀµÄÓû§Á¬½Óµ½·þÎñÆ÷ʱËùʹÓõĶ˿ڡ£
¡¡¡¡$_SERVER['SCRIPT_FILENAME'] µ±Ç°Ö´Ðнű¾µÄ¾ø¶Ô·¾¶Ãû¡£
¡¡¡¡$_SERVER['SERVER_PORT'] ·þÎñÆ÷ËùʹÓõĶ˿Ú
¡¡¡¡$_SERVER['SCRIPT_NAME'] °üº¬µ±Ç°½Å±¾µÄ·¾¶¡£ÕâÔÚÒ³ÃæÐèÒªÖ¸Ïò×Ô¼ºÊ±·Ç³£ÓÐÓá£
¡¡¡¡$_SERVER['REQUEST_URI'] ·ÃÎÊ´ËÒ³ÃæËùÐèµÄURI¡£Èç“/index.html”¡£
¡¡¡¡$_SERVER['PHP_AUTH_USER'] Ó¦ÓÃÔÚHTTPÓû§µÇ¼ÈÏÖ¤¹¦ÄÜÖУ¬Õâ¸ö±äÁ¿ÊÇÓû§ÊäÈëµÄÓû§Ãû¡£
¡¡¡¡$_SERVER['PHP_AUTH_PW'] Ó¦ÓÃÔÚHTTPÓû§µÇ¼ÈÏÖ¤¹¦ÄÜÖУ¬Õâ¸ö±äÁ¿±ãÊÇÓû§ÊäÈëµÄÃÜÂë¡


Ïà¹ØÎĵµ£º

̽ÌÖPHP SQL×¢ÈëµÄ½â¾ö˼·

˼·:SQLÀᄀ¿ÉÄܵIJÉÓÃÁ½¸öÒýºÅ±ÕºÏ±äÁ¿;¶Ô±äÁ¿ÖеÄÒýºÅתÒå;¶Ô²»ÄܲÉÓÃ2¸öÒýºÅ±ÕºÏµÄ±äÁ¿,ÏÈÔ¤ÏÈÅжϱäÁ¿ÀàÐÍ;  
   
  ·½°¸:  
  1   ËùÓзÇÊýÖµÔËËã(Èç×Ö·û,¼òµ¥ÊýÖµÐ͵ȵÈ)µÄSQL±äÁ¿¶¼¼ÓÒýºÅ;  
  2   ËùÓзÇÊýÖµÔËËãµÄSQL±äÁ¿µÄÖµ¶¼²ÉÓÃmagic_quotes_gpc» ......

phpѧϰÐĵÃ(ÊʺÏphp³õѧÕß)


À´Ô´£º ·¢²¼Ê±¼ä£º2009-09-18 ·¢²¼ÈË£º ä¯ÀÀ£º30È˴Π ×ÖÌ壺[´ó ÖРС]  
 ¡¾1¡¿Ò³ÃæÖ®¼äÎÞ·¨´«µÝ±äÁ¿ get,post,sessionÔÚ×îеÄphp°æ±¾ÖÐ×Ô¶¯È«¾Ö±äÁ¿Êǹرյģ¬ËùÒÔÒª´ÓÉÏÒ»Ò³ÃæÈ¡µÃÌá½»¹ýÀ´µÃ±äÁ¿ÒªÊ¹ÓÃ$_GET['foo'],$_POST['foo'],$_SESSION['foo']À´µÃµ½
µ±È»Ò²¿ÉÒÔÐÞ¸Ä×Ô¶¯È«¾Ö±äÁ¿Îª¿ª(ph ......

ÓйØphpǰ;¶þ

¹ØÓÚPHPµÄǰ;£¨¶þ£© £¨À´×Ô±¾Õ¾µÄÏûÏ¢£©
3.2ÔÚWindows 95/98/NT/2000ÉÏ¿ìËÙ°²×°Apache Web·þÎñÆ÷£¨10ÃëÖÓ£©
ÔÚWindowsÉÏÔËÐÐPHP£¬ÄãÐèÒªÒ»¸öWeb·þÎñÆ÷£¬Äã¿ÉÒÔʹÓÃ΢ÈíµÄIIS£¬Ò²¿ÉÒÔʹÓÃÃâ·ÑµÄApache ¡£ÒòΪ¿ÉÒÔͨ¹ýApacheµÄ°²×°Îļþsetup.exe½øÐа²×°£¬¿ÉÒÔΪÄã½ÚÊ¡Ðí¶àʱ¼ä¡£
PHPTtriadÊÇÒ»¸ö°üÀ¨Apache¡¢PHP¡¢MySQ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ