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

Nginx+PHP ÅäÖé¶´

Õâ¸ö©¶´ÑϸñÉÏ˵²¢²»ÊÇ Nginx ºÍ PHP ±¾ÉíµÄ©¶´Ôì³ÉµÄ£¬¶øÊÇÓÉÅäÖÃÔì³ÉµÄ¡£ÔÚÎÒ֮ǰдµÄÐí¶àÅäÖÃÖУ¬¶¼ÆÕ±é´æÔÚÕâ¸ö©¶´¡£
¼òÒ×¼ì²â·½·¨£º
´ò¿ª Nginx + PHP ·þÎñÆ÷ÉϵÄÈÎÒâÒ»ÕÅͼƬ£¬È磺
http://blog.lrenwang.com/test.png
Èç¹ûÔÚͼƬÁ´½Óºó¼ÓÒ»´® /xxx.php £¨xxxΪÈÎÒâ×Ö·û£©ºó£¬È磺
http://blog.lrenwang.com/test.png/xxx.php
ͼƬ»¹ÄÜ·ÃÎʲ¢ÇÒÊä³öµÄ Content-Type Ϊ text/html µÄ»°£¬ËµÃ÷ÄãµÄÅäÖôæÔÚ©¶´¡£
·ÖÎöÔ­Òò
Nginx ´«¸ø PHP µÄֵΪ /var/www/lrenwang/test.png/xxx.php£¬¼´ $_SERVER ÖÐ ORIG_SCRIPT_FILENAME µÄÖµ£¬µ«ÊÇ $_SERVER ÖÐ SCRIPT_FILENAME È´ÊÇ /var/www/test/test.png¡£
Ô­ÒòÊÇ£¬/var/www/lrenwang/test.png/xxx.php ²¢²»´æÔÚ£¬¶ÔÓÚÕâЩ²»´æÔڵķ¾¶£¬PHP »á¼ì²é·¾¶ÖдæÔÚµÄÎļþ£¬²¢½«¶àÓàµÄ²¿·Öµ±×÷ PATH_INFO¡£
ÕâÀ/var/www/lrenwang/test.png ±» PHP ½âÎöΪ SCRIPT_FILENAME£¬/xxx.php ±» PHP ½âÎöΪ PATH_INFO ºó±»¶ªÆú£¬Òò´Ë²¢Ã»ÓÐÔÚ $_SERVER ÖгöÏÖ¡£
½â¾ö·½·¨£º
½â¾öÕâ¸ö©¶´µÄ·½·¨ºÜÏÔÈ»£º¹Ø±ÕÉÏÃæËùÊöµÄ½âÎö¼´¿É¡£
Õâ¸ö½âÎö¿ÉÒÔÔÚ PHP µÄÅäÖÃÎļþÖÐÉèÖã¬Ä¬ÈÏΪ¿ªÆô¡£ÔÚÕâÀïÎÒÃÇÐèÒª½«Ëü¹Ø±Õ£º
;cgi.fix_pathinfo=1
cgi.fix_pathinfo=0
ÆäÖÐ cgi.fix_pathinfo=0 ΪÐÂÔöµÄÅäÖÃÐУ¬±íʾ¹Ø±Õ PHP µÄ×Ô¶¯ PATH_INFO ¼ì²â¡£¹Ø±Õºó£¬¸ÃÅäÖé¶´¼´¿ÉÏû³ý¡£
¸üºÃµÄ½â¾ö·½°¸£¿
ÒÔÉÏ·½°¸²¢²»ÊÇ×îÍêÃÀµÄ£¬Èç¹ûÄãÏÈǰÓÐÓõ½ cgi.fix_pathinfo Õâ¸öÌØÐÔ£¬Ó°Ïì»áºÜ´ó£¬±ÈÈç¹Ø±Õºó£¬WordpressÎÄÕ嵀 URL Ŀ¼ÐÎʽ¾ÍµÃÓà rewrite À´ÊµÏÖÁË¡£
Èç¹û¿ÉÒÔ½« PHP ÉèÖóÉÖ»½âÎö .php ΪÀ©Õ¹ÃûµÄÎļþ£¬ÄÇôÕâ¸öÎÊÌâ½â¾öÆðÀ´»á¸üºÏÀí¡£
²»¹ýÎÒûÕÒµ½Ïà¹ØµÄÉèÖÃÏ»òÐí½ñºóÓ¦¸Ã³öÏÖÔÚ php-fpm µÄÅäÖÃÎļþÖУ¿
×ܽ᣺
ÕâÀàÎÊÌâ»ù±¾ÉÏÊÇÎÞ·¨Ô¤Áϵ쬵«ÊÇÈç¹û¼Ü¹¹Éè¼ÆÁ¼ºÃµÄ»°£¬¼´Ê¹´æÔÚÕâ¸öÎÊÌ⣬Ҳ²»»áÓ°Ï찲ȫÐÔ¡£ÕâÀï¸ø³ö¼Ü¹¹Éϵݲȫ½¨Ò飺
* ¾¡¿ÉÄÜʹ¶¯¾²ÄÚÈÝ·ÖÀ룬ËùÓеľ²Ì¬ÄÚÈÝ´æÔÚÓÚ¾²Ì¬ÄÚÈÝ·þÎñÆ÷£¬¾²Ì¬ÄÚÈÝ·þÎñÆ÷Éϲ»½âÎöPHP£¬ÕâÑù¾²Ì¬Îļþ¾ÍÓÀÔ¶²»Äܱ»½âÎöÁË¡£


Ïà¹ØÎĵµ£º

phpµÄ log4php °²×°ÅäÖÃÏê½â £¨¸½ÏÂÔØµØÖ·£©

      ¿´ÁËÍøÉϺܶàlog4phpµÄÎÄÕ£¬´ó¶àÊÇv0.8¡¢v0.9µÄ£¬¶¼ºÜ¾ÉÁË£¬°´ÉÏÃæµÄ×ö×ÜÊDz»¶Ô£¬ÏÖÔÚ¶¼³öµ½v2.0ÁË£¬ºÃÁË£¬ÎҾ͸ø´ó¼Ò˵˵´Ë°æ±¾µÄÈçºÎÅäÖã¡
      1¡¢ÏÈÉÏhttp://www.apache.org/dyn/closer.cgi/incubator/log4php/2.0.0/apache-log4php-2.0.0-incubating-src ......

±àд°²È« PHP Ó¦ÓóÌÐòµÄÆß¸öϰ¹ß

ÔÚÌá¼°°²È«ÐÔÎÊÌâʱ£¬ÐèҪעÒ⣬³ýÁËʵ¼ÊµÄƽ̨ºÍ²Ù×÷ϵͳ°²È«ÐÔÎÊÌâÖ®Í⣬Äú»¹ÐèҪȷ±£±àд°²È«µÄÓ¦ÓóÌÐò¡£ÔÚ±àд PHP Ó¦ÓóÌÐòʱ£¬ÇëÓ¦ÓÃÏÂÃæµÄÆß¸öϰ¹ßÒÔÈ·±£Ó¦ÓóÌÐò¾ßÓÐ×îºÃµÄ°²È«ÐÔ£º
ÑéÖ¤ÊäÈë
±£»¤Îļþϵͳ
±£»¤Êý¾Ý¿â
±£»¤»á»°Êý¾Ý
±£»¤¿çÕ¾µã½Å±¾£¨Cross-site scripting£¬XSS£©Â©¶´
¼ìÑé±íµ¥ post
Õ ......

Îå¸ö³£¼û PHP Êý¾Ý¿âÎÊÌâ

Èç¹ûÖ»ÓÐÒ»ÖÖ ·½Ê½Ê¹ÓÃÊý¾Ý¿âÊÇÕýÈ·µÄ……
Äú¿ÉÒÔÓúܶàµÄ·½Ê½´´½¨Êý¾Ý¿âÉè¼Æ¡¢Êý¾Ý¿â·ÃÎʺͻùÓÚÊý¾Ý¿âµÄ PHP ÒµÎñÂß¼­´úÂ룬µ«×îÖÕÒ»°ãÒÔ´íÎó¸æÖÕ¡£±¾ÎÄ˵Ã÷ÁËÊý¾Ý¿âÉè¼ÆºÍ·ÃÎÊÊý¾Ý¿âµÄ PHP ´úÂëÖгöÏÖµÄÎå¸ö³£¼ûÎÊÌ⣬ÒÔ¼°ÔÚÓöµ½ÕâЩÎÊÌâʱÈçºÎÐÞ¸´ËüÃÇ¡£
ÎÊÌâ 1£ºÖ±½ÓʹÓà MySQL
Ò»¸ö³£¼ûÎÊÌâÊǽÏÀ쵀 PH ......

ΪPHP°²×°Xdebugµ÷ÊÔ¹¤¾ß

Ò»¡¢zend studioµÄÅäÖÃ
1.µ½zendµÄ°²×°Ä¿Â¼ÏÂɾ³ýÁ½¸öÎļþ(¿ÉÓпÉÎÞ.ÖÁÉÙÎÒ²»É¾³ýÒ²²»Òƶ¯¿ÉÒÔ)
   ÎҵݲװĿ¼£ºD:\Program Files\Zend\Zend Studio - 7.0.2\plugins\
   ɾ³ýµÄÎļþÊÇ£ºcom.zend.php.debug.core_7.0.0.v20090607-1658.jar
        &nbs ......

½«PHP´úÂëת»»µ½Scala´úÂë

ÓÐÒ»¸ö¿ªÔ´ÏîÄ¿Ìṩ½«PHP´úÂëת»»³ÉScala´úÂëµÄ¹¦ÄÜ£¬¸ÃÏîÄ¿µÄÍøÕ¾ÊÇ http://code.google.com/p/php-to-scala-migration-helper/¡£
In short, php-to-scala converts PHP code to clean, maintainable Scala source code. To cut to the chase, see ConversionExamples, or the feature-by-feature DesignD ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ