WindowsÏ°²×°×îеÄApache+PHP+MySQLÖ¸ÄÏ
×¢Ò⣺֮ǰÎÒÔÚÍøÉÏÕÒÁ˺öàµÄ×ÊÁÏ NND¶¼²»ÄÜÕý³£ÅäÖóɹ¦ ¸ãµÃÎÒÊǷdz£µØÓôÃÆ£¡
ÕÒµ½ÕâƪÎÄÕÂÖ®ºóÎÒÖÕÓÚÅäÖóɹ¦ÁË£¡ÍÛºÃˬѽ£¡Ö»Òª°´ÕÕ ÉÏÃæµÄ²½Öè¾ÍÒ»¶¨Äܹ»³É¹¦µÄ£¡
´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°£¬Í¬Ê±Ò²ÊÊÓÃÓÚWindows 2003ϵͳϵݲװºÍÅäÖá£
1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Windows XP ÖÐÎÄ°æ, Apache, PHP, MySQL µÄ×îа汾ÊǽØÖ¹µ½ 2007.09.07£¬·Ö±ðÔÚÆä¹ÙÍøÏÂÔصÄ:
* Apache 2.2.6£ºhttp://apache.mirror.phpchina.com/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 zip package£©: http://www.php.net/downloads.php ÎÒ֮ǰÊÇÏÂÔØÁËÒ»¸öexe¸ñʽµÄ¹þ¹þ ÏÖÔÚÏÂÁËÒ»¸özip¸ñʽµÄ
* MySQL 5.0.45 Windonws: http://dev.mysql.com/downloads/
2. °²×°µÄĿ¼½á¹¹¹æ»®
ΪÁË·½±ãά»¤£¬¿ÉÒÔ½«·þÎñÆ÷Èí¼þ°²×°ÔÚϵͳÅÌ£¨CÅÌ£©¶ø°Ñ×Ô¼ºµÄÎļþ¶¨Î»µ½ÆäËûÅÌ£¬ÕâÑù¶ÔÓÚÒÔºóµÄά»¤ºÜÖØÒª¡£
3. ÔÚ Windows XP Ï°²×° Apache 2.2.6
Windows XP ϵݲװ
1. ÔËÐÐ apache 2.2.6 µÄ°²×°³ÌÐò£¬¸ù¾ÝÌáʾһ· Next ¼´¿É¡£ÔÚ Server Information µÄ Network Domain¡¢Server Name ×Ö¶ÎËæ±ãÌîÉÏÒ»¸öÓòÃû¼´¿É£¬Èçphp.com£¬È»ºó¸ù¾ÝÌáʾһ· Next Íê³É¼´¿É¡£
2. ÔÚ°²×°½áÊøʱ£¬»áµ¯³öÒ»¸ö DOS ´°¿Ú£¬È»ºó¾ÍÏûʧÁË£¬ÕâÊÇϵͳapache×Ô¶¯Æô¶¯ÁË¡£
4. ÔÚ Windows XP Ï°²×° php 5.2.4
1. ½«ÏÂÔØµÄ php 5 ZIP °üÖ±½Ó½âѹ£¬ÎÒÖ±½Ó½« PHP 5.2.4 zip Îļþ½âѹµ½ d:\php Ŀ¼ÏÂÃæ¡£°²×° php ²»½¨ÒéʹÓà win32 °²×°³ÌÐò(Ö÷ÒªÊÇÒÔºó°²×°À©Õ¹Âé·³£©¡£
2. ÔÚ×ÊÔ´¹ÜÀíÆ÷ÖнøÈë php µÄ°²×°Ä¿Â¼£¬½« php.ini-dist »ò php.ini-recommended ¸´ÖÆÒ»·Ý£¬ÃüÃûΪ php.ini¡£È»ºó´ò¿ª php.ini¡£
3. ÕÒµ½:
;extension=php_mysql.dll
½«Ç°ÃæµÄ ; ºÅÈ¥µô£¬ ¸Ä³É£º
extension=php_mysql.dll
4. ÕÒµ½:
extension_dir = “./”
½«Æä¸ÄΪÄãµÄ php °²×°Ä¿Â¼Ï ext ×ÓĿ¼µÄ¾ø¶Ô·¾¶¡£ÀýÈçÎҵģº
extension_dir = “D:/php/ext/”
Õâ²½ºÜÖØÒª ¡£·ñÔò½ÓÏÂÀ´ php »áÕÒ²»µ½ php_mysql.dll Ä£¿é£¬ÎÞ·¨×°ÔØ¡£
5. ÔÚ“¿ØÖÆÃæ°å”->“ϵͳ”->“¸ß¼¶”->“»·¾³±äÁ¿”£¬Ôړϵͳ±äÁ¿”ÀïÃæÕÒµ½path£¬±à¼pathµÄ±äÁ¿Öµ£¬Ìí¼ÓÄãµÄphpĿ¼D:\php£¬Ç°ÃæÒ»¶¨ÒªÓ÷ֺÅ(;)°ÑËüºÍÇ°ÃæµÄÖµ·Ö¿ª¡£
5. ÅäÖà Apache ºÍ PHP
´ò¿ª Apache °²×°Ä¿Â¼Ï嵀 conf ×ÓÄ¿Â
Ïà¹ØÎĵµ£º
½üÈÕÔÚÓÃ×Ô¼ºÒÔǰдµÄhttpÏÂÔØÆ÷ÏÂÔØijһ¸öphpÒ³ÃæÒÔÍâÔâÓö403´íÎó.µ«ÊÇieÈ´Äܹ»ÕýÈ··ÃÎÊ. ÈÕÖ¾ÈçÏÂ: IE: Time At:0005504671
Line:10
send: 192.168.1.2 –> xxx.xxx.xxx.xxx len:351
GET /test.jpg HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Enc ......
×÷Õߣºhttp://blog.csdn.net/zhoufoxcn/archive/2009/11/05/4769858.aspx
˵Ã÷£ºÒòΪ×î½ü¹¤×÷¹¤×÷¹Øϵ£¬ÐèÒª¿ª·¢Ò»¸öÔÚLinuxÏÂÔËÐеÄWeb
Application£¬ÐèÒª¶ÔÏÖÔڱȽÏÁ÷ÐеÄһЩPHP¿ò¼Ü×öÒ»¸öÁ˽âºÍÆÀ¹À£¬ÏÂÃæµÄÕâƪÎÄÕÂÊDZÊÕß×î½üѧϰһ¸ö±È½ÏеÄPHP
FrameworkµÄÒ»µã¾ÀúºÍ²Ù×÷²½Ö裬ÒòΪ¹Ù·½µÄÊÖ²áдµÃ±È½Ï»Þ ......
×î½üÎҵļ¸ÆªÎÄÕ¶¼ÊÇÊÇ×î½üÏîÄ¿µÄÒ»µãÐĵÃ^^
Õâ¸öÏîÄ¿Ò»¿ªÊ¼¾ÍÉè¼ÆµÄ“ºÜ´ó”£¬¿¼ÂÇÁ˺ฺܶÔؾùºâ·½ÃæµÄ¶«Î÷£¬±ÈÈç²ÉÓÃnginx½«phpµÄÇëÇó·Ö̯µ½Èô¸É¸öÔËÐÐphp fastcgiµÄ¶ÀÁ¢·þÎñÆ÷ÖС£ÕâÑùµÄÉè¼Æ³ýÁËÔÚÿ¸öphp fastcgi·þÎñÆ÷ÖÐÒª±£´æÒ»·Ý³ÌÐòµÄ¿½±´ÒÔÍ⣬»¹ÓÐÒ»¸öؽ´ý½â¾öµÄÎÊÌâ¡£ÓÉÓÚphp fastcgi½ø³Ì·Ö±ðÔËÐÐÔ ......
PHP³ÌÐòÔ±×îÒ×·¸10ÖÖ´íÎó(ת)
php 2008-07-11 23:45 ÔĶÁ5 ÆÀÂÛ0
×ֺţº ´ó´ó ÖÐÖРСС
PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´ ......
mysql set names ÎÊÌâ
mysql_query("set names 'utf8'");
Ò»Ö±ÒÔÀ´×ÜÒÔΪset names ÊÇÓÃÀ´ÉèÖÃmsyql µÄ×Ö·û¼¯µÄ£¬×î½ü×÷¸ö¶«Î÷²Å·¢ÏÖ×Ô¼ºÈÏʶÉϵĴíÎó£¬
²éÒ»ÏÂÊÖ²á
SET NAMES ‘x‘Óï¾äÓëÕâÈý¸öÓï¾äµÈ¼Û£º
mysql> SET character_set_client = x;
mysql> SET character_set_results = x;
mysql> ......