´î½¨Nginx+php×éºÏWeb·þÎñÆ÷
±¾ÆªÎÄÕÂתÔØÍøÂ磬תÔصØÖ·£ºhttp://blog.s135.com/read.php?366
Nginx
("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ·´Ïò´úÀí·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ª·¢µÄ£¬ËüÒѾÔÚ¸ÃÕ¾µãÔËÐг¬¹ýÁ½Äê°ëÁË¡£Igor ½«Ô´´úÂëÒÔÀàBSDÐí¿ÉÖ¤µÄÐÎʽ·¢²¼¡£
¡¡¡¡Nginx ³¬Ô½ Apache µÄ¸ßÐÔÄܺÍÎȶ¨ÐÔ£¬Ê¹µÃ¹úÄÚʹÓà Nginx ×÷Ϊ Web ·þÎñÆ÷µÄÍøÕ¾Ò²Ô½À´Ô½¶à£¬ÆäÖаüÀ¨ÐÂÀ˲©¿Í
¡¢ÐÂÀ˲¥¿Í
¡¢ÍøÒ×ÐÂÎÅ
µÈÃÅ»§ÍøվƵµÀ£¬Áù¼ä·¿
¡¢56.com
µÈÊÓƵ·ÖÏíÍøÕ¾£¬Discuz!¹Ù·½ÂÛ̳
¡¢Ë®Ä¾ÉçÇø
µÈÖªÃûÂÛ̳£¬¶¹°ê
¡¢YUPOOÏà²á
¡¢º£ÄÚSNS
¡¢Ñ¸À×ÔÚÏß
µÈÐÂÐËWeb 2.0ÍøÕ¾¡£
¡¡¡¡Nginx µÄ¹Ù·½ÖÐÎÄά»ù£ºhttp://wiki.codemongers.com/NginxChs
¡¡¡¡Ôڸ߲¢·¢Á¬½ÓµÄÇé¿öÏ£¬NginxÊÇApache·þÎñÆ÷²»´íµÄÌæ´úÆ·¡£NginxͬʱҲ¿ÉÒÔ×÷Ϊ7²ã¸ºÔؾùºâ·þÎñÆ÷À´Ê¹Ó᣸ù¾ÝÎҵIJâÊÔ½á¹û£¬Nginx 0.7.51 + PHP 5.2.8 (FastCGI) ¿ÉÒÔ³ÐÊÜ3ÍòÒÔÉϵIJ¢·¢Á¬½ÓÊý£¬Ï൱ÓÚͬµÈ»·¾³ÏÂApacheµÄ10±¶
¡£
¡¡¡¡¸ù¾ÝÎҵľÑ飬4GBÄÚ´æµÄ·þÎñÆ÷+Apache£¨preforkģʽ£©Ò»°ãÖ»ÄÜ´¦Àí3000¸ö²¢·¢Á¬½Ó£¬ÒòΪËüÃǽ«Õ¼ÓÃ3GBÒÔÉϵÄÄڴ棬»¹µÃΪϵͳԤÁô1GBµÄÄÚ´æ¡£ÎÒÔø¾¾ÍÓÐÁ½Ì¨Apache·þÎñÆ÷£¬ÒòΪÔÚÅäÖÃÎļþÖÐÉèÖõÄMaxClientsΪ4000£¬µ±Apache²¢·¢Á¬½ÓÊý´ïµ½3800ʱ£¬µ¼Ö·þÎñÆ÷ÄÚ´æºÍSwap¿Õ¼äÓÃÂú¶ø±ÀÀ£¡£
¡¡¡¡¶øÕą̂ Nginx 0.7.51 + PHP 5.2.8 (FastCGI) ·þÎñÆ÷ÔÚ3Íò²¢·¢Á¬½ÓÏ£¬¿ªÆôµÄ10¸öNginx½ø³ÌÏûºÄ150MÄڴ棨15M*10=150M£©£¬¿ªÆôµÄ64¸öphp-cgi½ø³ÌÏûºÄ1280MÄڴ棨20M*64=1280M£©£¬¼ÓÉÏϵͳ×ÔÉíÏûºÄµÄÄڴ棬×ܹ²ÏûºÄ²»µ½2GBÄÚ´æ¡£Èç¹û·þÎñÆ÷ÄÚ´æ½ÏС£¬ÍêÈ«¿ÉÒÔÖ»¿ªÆô25¸öphp-cgi½ø³Ì£¬ÕâÑùphp-cgiÏûºÄµÄ×ÜÄÚ´æÊý²Å500M¡£
¡¡¡¡ÔÚ3Íò²¢·¢Á¬½ÓÏ£¬·ÃÎÊNginx 0.7.51 + PHP 5.2.8 (FastCGI) ·þÎñÆ÷µÄPHP³ÌÐò£¬ÈÔÈ»Ëٶȷɿ졣ÏÂͼΪNginxµÄ״̬¼à¿ØÒ³Ã棬ÏÔʾµÄ»î¶¯Á¬½ÓÊýΪ28457£¨¹ØÓÚNginxµÄ¼à¿ØÒ³ÅäÖ㬻áÔÚ±¾ÎĽÓÏÂÀ´Ëù¸ø³öµÄNginxÅäÖÃÎļþÖÐдÃ÷£©£º
¡¡¡¡
¡¡¡¡ÎÒÉú²ú»·¾³ÏµÄÁ½Ì¨Nginx + PHP5£¨FastCGI£©·þÎñÆ÷£¬Åܶà¸öÒ»°ã¸´ÔӵĴ¿PHP¶¯Ì¬³ÌÐò£¬µ¥Ì¨Nginx + PHP5£¨FastCGI£©·þÎñÆ÷ÅÜPHP¶¯Ì¬³ÌÐòµÄ´¦ÀíÄÜÁ¦ÒѾ³¬¹ý“700´ÎÇëÇó/Ãë
”£¬Ï൱ÓÚÿÌì¿ÉÒÔ³ÐÊÜ6000Íò£¨700*60*60*24=60480000£©µÄ·ÃÎÊÁ¿£¨¸ü¶àÐÅÏ¢¼û´Ë
£©£¬¶ø·þÎñÆ÷µÄϵͳ¸ºÔØÒ²²»¸ß£º
¡¡¡¡
¡¡¡¡°²×°²½Ö裺
¡¡¡¡£¨ÏµÍ³ÒªÇó£ºLinux 2.
Ïà¹ØÎĵµ£º
1.ÅäÖÃIISϵÄPHP»·¾³
ÎÒÓõÄÊÇWindows server 2003+IIS 6.0+PHP,µ«¸Õ¿ªÊ¼ÓõÄPHP5.3£¬°´ÕÕÍøÉϵķ½·¨http://www.gzu521.com/campus/article/network/200902/182924.htmÒ»²½²½ÅäÖ㬵«Êǽá¹ûÔËÐгöÏÖÁËÒ»¸öÎÊÌ⣬¾ÍÊÇThe FastCGI Handler was unable to process the request.ÕÒÁ˺ܶà½â¾ö·½·¨µ«ÊÇ»¹ÊÇûÓнâ¾ö£¬×îºóÎÒ»»³É ......
basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......
JSON
»ù
ÓÚJavaScript Programming Language, Standard ECMA-262 3rd Edition -
December 1999µÄÒ»¸ö×Ó¼¯¡£JSON²ÉÓÃÍêÈ«¶ÀÁ¢ÓÚÓïÑÔµÄÎı¾¸ñʽ£¬µ«ÊÇҲʹÓÃÁËÀàËÆÓÚCÓïÑÔ¼Ò×åµÄÏ°¹ß£¨°üÀ¨C, C++, C#, Java
, JavaScript, Perl, PythonµÈ£©¡£ÕâЩÌØÐÔʹJSON³ÉΪÀíÏëµÄÊý¾Ý½»»»ÓïÑÔ¡£
JSON½¨¹¹ÓÚÁ½Öֽṹ£º
“Ãû
³ ......
´ó¼ÒºÃ£¬Çë½ÌÒ»¸öÎÊÌ⣬Âé·³ÓÐÀàËƾÑéµÄ°ï°ï棬лл¸÷λÁË!
±¾ÈËÒÔǰѧ¹ýÁ½ÄêµÄ.NET,ÓÃC#£¬ASP.NET£¬Winfrom,SQLServer×ö¹ý¼¸¸öÍøÕ¾ºÍСÐ͵ĹÜÀíϵͳ¡£
ÏÖÔÚµ½Ò»¼Òй«Ë¾£¬ÒªÇóÎÒѧPHP¡£Âé·³¸ßÊÖÖ¸µãһϣ¬P ......
<?php
$n = array('13','14','55','10','54','2','79','106','89','90','22','60','111','77777','-110','-10','123');
function partition($n,$left,$right)
{
global $n;
$pivot = $n[$left];
$lo=$left;
$hi=$right+1;
while($lo+1!=$hi) {
if($n[$lo+1]<$pivot)
$lo++;
else if($n[$hi-1] ......