Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³ÌÖÐÕ¼ÓÐÖØÒªµÄµØ룬¼¸ºõËùÓÐPHP½Å±¾µÄÊäÈëºÍÊä³ö¶¼Óõ½×Ö·û´®¡£ÓÈÆäÔÚPHPÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÎªÁËʵÏÖijÏÄÜ£¬¾©³ÇÐèÒª¶ÔijЩ×Ö·û´®½øÐÐÌØÊâ´¦Àí£¬Èç»ñÈ¡×Ö·û´®µÄ³¤¶È¡¢½ØÈ¡×Ö·û´®¡¢Ìæ»»×Ö·û´®µÈ¡£ËùÒÔÕâÒ²ÊÇÎÒÃǽñÌì¿Î³ÌµÄÖ÷ÒªÄÚÈÝ£¬Ï£ÍûѧԱ¿ÉÒÔÈÏÕæѧϰ£¬ÇÚ¼ÓÁ·Ï°¡£
8.3.1 È¥³ý×Ö·û´®Ê×λ¿Õ¸ñºÍÌØÊ ......

PHP µÄ×Ö·û´®±í´ïÈýÖÖ·½Ê½


µ¥ÒýºÅ
      $str = 'ÎÒÊÇһͷ´ó»ÒÀÇ';
Ë«ÒýºÅ
      $str2 = "ÄãÒ²ÊÇһͷ´ó»ÒÀÇ";
¶¨½ç·û
      $str3 = <<< DDD
          ¶¼ÊÇ´ó»ÒÀÇ£¬
   &nb ......

[PHP] еÄÀï³Ì±® Hush Framework

²»Öª²»¾õ£¬5Ô¹ýÁË´ó°ëÁË£¬Ïë±£³Öÿ¸öÔÂÖÁÉÙ¸ø Blog Ìí¼ÓһЩÐÂÏʵÄÎÄÕ£¬Ò²Ëæ±ã¸ø×Ô¼ºµÄ career ¹ì¼£×öÒ»¸ö¼Ç¼£¬ÓÚÊÇÌá±Ê£¬ºÇºÇ~ ½ñÌìÒª½éÉÜÒ»ÏÂʯͷ×îеÄ×÷Æ· Hush Framework£¬Õâ¸ö¿ò¼ÜÊÇÎÒÕâÁ½¸öÔµÄÐÄѪ֮×÷£¬±¾ÈË»¹ÊDZȽÏÂúÒâµÄ£¬ÒÔÏ»á¸ø´ó¼Ò½éÉÜһЩÕâ¸ö¶«¶«µÄÁÁµã¡£Õâ¸ö×÷Æ·µÄ±¾ÒâÊÇΪ¹«Ë¾ÈÕºóµÄÓ¦Óÿª·¢Ìṩһ¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ