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

Linux+Apache+Mysql+PHPÓÅ»¯¼¼ÇÉ


LAMPÕâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ãµÄËæʱ»ñµÃ²¢Ãâ·Ñ»ñµÃ¡£Õâ¾Íµ¼ÖÂÁËÕâЩ×é¼þ¾­³£ÔÚÒ»ÆðʹÓá£ÔÚ¹ýÈ¥µÄ¼¸ÄêÀÕâЩ×é¼þµÄ¼æÈÝÐÔ²»¶ÏÍêÉÆ£¬ÔÚÒ»ÆðµÄÓ¦ÓÃÇéÐαäµÃ·Ç³£Æձ㡣ΪÁ˸ÄÉƲ»Í¬×é¼þÖ®¼äµÄЭ×÷£¬ÒѾ­´´½¨ÁËijЩÀ©Õ¹¹¦ÄÜ¡£Ä¿Ç°£¬¼¸ºõÔÚËùÓеÄLinux·¢²¼°æÖж¼Ä¬ÈÏ°üº¬ÁË“LAMP stack”µÄ²úÆ·¡£ÕâЩ²úÆ·×é³ÉÁËÒ»¸öÇ¿´óµÄWebÓ¦ÓóÌÐòƽ̨
¡¡¡¡LAMP ƽ̨ÓÉËĸö×é¼þ×é³É£¬³Ê·Ö²ã½á¹¹¡£Ã¿Ò»²ã¶¼ÌṩÁËÕû¸öÈí¼þÕ»µÄÒ»¸ö¹Ø¼ü²¿·Ö£º
¡¡¡¡Linux£ºLinux ´¦ÔÚ×îµÍ²ã£¬Ìṩ²Ù×÷ϵͳ¡£ÆäËûÿ¸ö×é¼þʵ¼ÊÉÏÒ²ÔÚ Linux ÉÏÔËÐС£µ«ÊÇ£¬²¢²»Ò»¶¨¾ÖÏÞÓÚ Linux£¬ÈçÓбØÒª£¬ÆäËû×é¼þÒ²¿ÉÒÔÔÚ Microsoft® Windows®¡¢Mac OS X »ò UNIX® ÉÏÔËÐС£
¡¡¡¡Apache£º´ÎµÍ²ãÊÇ Apache£¬ËüÊÇÒ»¸ö Web ·þÎñÆ÷¡£Apache Ìṩ¿ÉÈÃÓû§»ñµÃ Web Ò³ÃæµÄ»úÖÆ¡£Apache ÊÇÒ»¿îÎȶ¨µÄ¡¢Ö§³Ö¹Ø¼üÈÎÎñµÄ·þÎñÆ÷£¬Internet Éϳ¬¹ý 65£¥ µÄÍøÕ¾¶¼Ê¹ÓÃËü×÷Ϊ Web ·þÎñÆ÷¡£PHP ×é¼þʵ¼ÊÉÏÊÇÔÚ Apache ÖУ¬¶¯Ì¬Ò³Ãæ¿ÉÒÔͨ¹ý Apache ºÍ PHP ´´½¨¡£
¡¡¡¡MySQL£ºMySQL Ìṩ LAMP ϵͳµÄÊý¾Ý´æ´¢¶Ë¡£ÓÐÁË MySQL£¬±ã¿ÉÒÔ»ñµÃÒ»¸ö·Ç³£Ç¿´óµÄ¡¢ÊʺÏÔËÐдóÐ͸´ÔÓÕ¾µãµÄÊý¾Ý¿â¡£ÔÚ Web Ó¦ÓóÌÐòÖУ¬ËùÓÐÊý¾Ý¡¢²úÆ·¡¢ÕÊ»§ºÍÆäËûÀàÐ͵ÄÐÅÏ¢¶¼´æ·ÅÔÚÕâ¸öÊý¾Ý¿âÖУ¬Í¨¹ý SQL ÓïÑÔ¿ÉÒÔºÜÈÝÒ׵زéѯÕâЩÐÅÏ¢¡£
¡¡¡¡PHP£ºPHP ÊÇÒ»Ãżòµ¥¶øÓÐЧµÄ±à³ÌÓïÑÔ£¬ËüÏñÊÇÕ³ºÏ¼Á£¬¿ÉÒÔ½« LAMP ϵͳËùÓÐÆäËûµÄ×é¼þÕ³ºÏÔÚÒ»Æð¡£Äú¿ÉÒÔʹÓà PHP ±àдÄÜ·ÃÎÊ MySQL Êý¾Ý¿âÖеÄÊý¾ÝºÍ Linux ÌṩµÄһЩÌØÐԵĶ¯Ì¬ÄÚÈÝ¡£
¡¡¡¡[¼ì²â¹¤¾ß]
¡¡¡¡ÎªÁ˵õ½ÍêÕûµÄµ÷ÊÔ½á¹û£¬½¨ÒéÄã²ÉÓà ApacheBench »òÕß httperfÖ®ÀàµÄÈí¼þ¡£Èç¹ûÄã¶Ô·Ç LAMP ¼Ü¹¹µÄ·þÎñÆ÷²âÊÔÓÐÐËȤµÄ»°£¬½¨ÒéÄã²ÉÓÃ΢ÈíµÄÃâ·ÑÈí¼þ£º Web Application Stress Tool£¨ÐèÒª NT »òÕß 2000£©¡££¨ÆäËü·þÎñÆ÷²âÊÔ¹¤¾ß£©
¼ì²â Apache £¬²ÉÓà top d 1 ÏÔʾËùÓнø³ÌµÄ CPU ºÍÄÚ´æÇé¿ö¡£ÁíÍ⣬»¹²ÉÓà apachectl status ÃüÁî
¡¡¡¡[Ó²¼þÓÅ»¯]
¡¡¡¡1¡¢Éý¼¶Ó²¼þµÄÒ»°ã¹æÔò£º¶ÔÓÚ PHP ½Å±¾¶øÑÔ£¬Ö÷ÒªµÄÆ¿¾±ÊÇ CPU £¬¶ÔÓÚ¾²Ì¬Ò³Ãæ¶øÑÔ£¬Æ¿¾±ÊÇÄÚ´æºÍÍøÂ硣һ̨ 400 Mhz µÄÆÕͨ±¼ÌÚ»úÆ÷ËùÏÂÔصľ²Ì¬Ò³Ãæ¾ÍÄÜÈà T3 רÏߣ¨45Mbps£©±¥ºÍ¡£
¡¡¡¡2¡¢²ÉÓà hdparm À´ÓÅ»¯´ÅÅÌ£¬Ò»


Ïà¹ØÎĵµ£º

¹ØÓÚPHPµÄ¼¸µãÎÊÌâ¼°½â¾ö·½·¨

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.ÕÒÁ˺ܶà½â¾ö·½·¨µ«ÊÇ»¹ÊÇûÓнâ¾ö£¬×îºóÎÒ»»³É ......

ʵÀýÏê½âPHP serializeÓëJSON½âÎö

JSON
»ù
ÓÚJavaScript Programming Language, Standard ECMA-262 3rd Edition -
December 1999µÄÒ»¸ö×Ó¼¯¡£JSON²ÉÓÃÍêÈ«¶ÀÁ¢ÓÚÓïÑÔµÄÎı¾¸ñʽ£¬µ«ÊÇҲʹÓÃÁËÀàËÆÓÚCÓïÑÔ¼Ò×åµÄÏ°¹ß£¨°üÀ¨C, C++, C#, Java
, JavaScript, Perl, PythonµÈ£©¡£ÕâЩÌØÐÔʹJSON³ÉΪÀíÏëµÄÊý¾Ý½»»»ÓïÑÔ¡£
JSON½¨¹¹ÓÚÁ½Öֽṹ£º
“Ãû
³ ......

Linux ƽ̨Ï PHP °²×° Æô¶¯

php°²×°
# tar xzvf php-5.2.5.tar.gz
# cd php-5.2.5
./configure --prefix=/home/redadmin/php --with-apxs2=/home/redadmin/apache/bin/apxs --with-mysql=/home/redadmin/mysql --enable-mbstring=all --enable-track-vars
# make && make install
# cp php.ini-dist /home/redadmin/php/lib/php.ini
# c ......

PythonºÍPHPÖ®±È½Ï

  ż¶û×ö¸ö¼òµ¥µÄWEB·þÎñ²âÊÔ³ÌÐò£¬ÎÒ»¹ÊÇϲ»¶²ÉÓÃPHP¡£¼ò½à£¬·ç¸ñºÍC/C++½Ó½ü£¬ÉÏÊֿ죬¶øÇÒ¿âÒ²ºÜÆëÈ«¡£ÒÔǰΪ¹ã¶«Òƶ¯×öÒƶ¯ÐÐÒµÖն˵ÄÑÝʾ³ÌÐòʱ£¬²ÉÓùúÄÚÒ»¸öÐÖµÜдµÄFleaPHP¿ªÔ´¿ò¼Ü£¬Á½Öܲ»µ½µÄʱ¼ä£¬ÎÒ´ÓÒ»¸ö¶ÔPHPÒ»ÎÞËùÖªµÄˮƽ£¬¿ìËٵĸ㶨ÁË30¶à¸öÒ³ÃæµÄºǫ́£¬ºóÀ´ÑÝʾЧ¹ûÒ²²»´í£¬Ò²ºÜÎȶ¨£¬´Ó´Ë¶ÔPHPÓÐÁ ......

È·±£PHP°²È«µÄËÄÌõ°²È«¹æÔò

ÓйØPHP
°²È«µÄ¼¸Ìõ¹æÔò
¹æÔò 1£º¾ø²»ÒªÐÅÈÎÍⲿÊý¾Ý»òÊäÈë
¹ØÓÚ Web Ó¦ÓóÌÐò°²È«ÐÔ£¬±ØÐëÈÏʶµ½µÄµÚÒ»¼þÊÂÊDz»Ó¦¸ÃÐÅÈÎÍⲿÊý¾Ý¡£ÍⲿÊý¾Ý£¨outside data£© °üÀ¨²»ÊÇÓɳÌÐòÔ±ÔÚ PHP

´úÂëÖÐÖ±½ÓÊäÈëµÄÈκÎÊý¾Ý¡£ÔÚ²ÉÈ¡´ëÊ©È·±£°²È«Ö®Ç°£¬À´×ÔÈκÎÆäËûÀ´Ô´£¨±ÈÈç GET ±äÁ¿¡¢±íµ¥ POST¡¢Êý¾Ý¿â¡¢ÅäÖÃÎļþ¡¢»á»°±äÁ¿»ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ