windows 7 Ï°²×°apache php ºÍmysqlµÄһЩÎÊÌâ¡£
ÔÚwindowsÏ°²×°ampÍøÉϵĽéÉܺܶàÁË¡£
ÎÒÕâÀïֻ˵Щ¹Ø¼üµÄ²¿·Ö£¬Ò»·½Ãæ×÷Ϊ±Ê¼Ç£¬ÁíÒ»·½ÃæºÍ´ó¼Ò¹²Ïí¡£
1.°²×°apache
a.ÕâÀïҪעÒ⣬ÔÚ¸Õ¿ªÊ¼ÌîдÖ÷»úÓòÃûʱ£¬Èç¹ûÄãûÓÐÓòÃû£¬¾ÍÔÚ±¾µØ°²×°£¬ÄǾÍÌîд±¾»úipÐÐÁË¡££¨ÎÒ¾õµÃÌîд127.0.0.1¸üºÃ£¬¾ßÌåÎÒûÊÔ¹ý£©
b.apache µÄĬÈ϶˿ÚÊÇ80£¬ÎҵĻúÆ÷²»ÖªÎªºÎ80¶Ë¿Ú×ÜÊÇ´¦ÓÚ¼àÌý״̬Ï£¨¿ÉÓÃnetstat -a ÃüÁî²é¿´£©£¬Òò´ËapacheÎÞ·¨Æô¶¯ÆðÀ´¡£Äã¿ÉÒÔ´ÓÆôһϻúÆ÷ÊÔÊÔ£¬¿´apacheÄܲ»Äܵõ½80¶Ë¿Ú£¬ÊµÔÚ²»ÐÐÁËÄãÔÚhttp.confÖÐÐÞ¸Äһ϶˿ڣ¬±ÈÈçµ½8080£¨ÄãËÑÒ»ÏÂ80¾Í¿ÉÒÔÕÒµ½ÔÚÄÄÀïÐÞ¸ÄÁË£©¡£
c.ÒªÊÇûÓÐʲôÎÊÌâÔÚä¯ÀÀÆ÷ÖÐÊäÈëlocalhostÓ¦¸Ã»áÓГIt work!” ÕâÑùµÄ×Ö·û,·ñÔò£¬ÎҾͲ»ÖªµÀÁË£¬ÄúÔÙgoogle°É¡£
2.°²×°php
a.½âѹ°²×°Îļþµ½ÄãµÄĿ¼£¨ÎÒÕâÀïÊÇG:\php5£©
b.ÐÞ¸Äphp.iniÎļþÇëÏÈÐÞ¸Ä doc_root [Ö¸ÏòÄãµÄÍøÕ¾¸ùĿ¼¡£ÎÒµÄÊÇ G:\Apache\htdocs ] extension_dir[phpµÄÀ©Õ¹¹¦ÄÜÄ£¿éλÖ㬾ÍÊÇphpÎļþ¼ÐÖеÄextÎļþ¼ÐλÖÃ]£¬×îÖÕÐÞ¸ÄΪ
doc_root = G:\Apache\htdocs
extension_dir = G:\php5\ext
3.apacheºÍphp¹ØÁªÆðÀ´
ÐÞ¸Ähttp.confÎļþ£¬ÔÚ×îÃæ¼ÓÉÏÈçÏ´úÂë
LoadModule php5_module "G:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .htm
PHPIniDir "G:/php5/"
ËùÓкÍ·¾¶Ïà¹ØµÄ£¬Çë×ÔÐÐÐ޸ġ£
ÏÖÔÚ ÔÚG:\Apache\htdocs Ŀ¼ÏÂн¨Ò»¸ötest.phpÎļþ£¬ÄÚÈÝΪ<?php phpinfo(); ?>
ÔÚä¯ÀÀÆ÷ÖÐÊäÈëlocalhost/test.phpÓ¦¸Ã»á¿´µ½ÄĸöphpµÄÅäÖÃÐÅÏ¢Ò³Ãæ¡££¨ÍøÉ϶àµÄÊÇ£¬ÎҾͲ»ÌùÁË£©
4.°²×°mysql
…………ÕâÀïÊ¡È¥N°Ù×Ö£¨Ã»Ê²Ã´ÒªËµµÄ£©
6.php¼ÓÔØmysql´¦ÀíÄ£¿é
ÐÞ¸Äphp.ini È¥µôextension=php_mbstring.dll£¬extension=php_mysql.dll֮ǰµÄ‘;’
Ôٴδò¿ªlocalhost/test.php ¿´ÀïÃæÊDz»ÊÇÓÐÁ˹ØÓÚmysqlµÄÏà¹ØÐÅÏ¢¡£
over
±¸×¢£¬ÔÚ½ÓÏÂÀ´°²×°discuzʱÈôÊÇÓöµ½Êý¾Ý¿âÁ¬½Ó³¬Ê±£¬ºÜ¿ÉÄÜÊÇipµØÖ·ÎÊÌâ¡£ÐÞ¸Älocalhost±¾»ú
Ïà¹ØÎĵµ£º
µ±×¢Éämysql¿âµÄÊäÈëµãµÄʱºò,ÎÒÃÇ¿ÉÒÔͨ¹ýversion()/user()/database()/password()µÈÄÚÖú¯ÊýÀ´µÃµ½mysqlµÄÏà¹ØÐÅÏ¢,ÆäʵÎÒÃÇÔÚ×¢ÉäµÄʱºò¿ÉÒÔÀûÓÃmysqlÄÚÖõıäÁ¿À´µÃµ½¸ü¶àµÄmysqlÐÅÏ¢
ÆäÖÐversion()¿ÉÒÔд³É@@versionÀ´°Ñversionµ±×ö±äÁ¿À´¶ÁÈ¡,ÕâÑùÒ»Ñù¿ÉÒԵõ½,ÆäËûµÄÄÚÖÃÊDz»¿ÉÒÔд³É±äÁ¿µÄÐÎʽ.
´ó¼Ò¶¼Ó¦¸ÃÓùýÀû ......
ºÚ¿ÍÈëÃż¼ÊõÖ®php+mysql×¢ÉäÓï¾ä¹¹Ô죺
Ò».Ç°ÑÔ£º
²âÊÔ°æ±¾ÐÅÏ¢£ºOkphp BBS v1.3 ¿ªÔ´°æ
ÓÉÓÚPHPºÍMYSQL±¾ÉíµÃÔÒò,PHP+MYSQLµÄ×¢ÉäÒª±ÈaspÀ§ÄÑ£¬ÓÈÆäÊÇ×¢ÉäʱÓï¾äµÄ¹¹Ôì·½Ãæ¸üÊǸöÄѵ㣬±¾ÎÄÖ÷ÒªÊǽè¶ÔOkphp BBS v1.3һЩÎļþµÃ¼òµ¥·ÖÎö£¬À´Ì¸Ì¸php+mysql×¢ÉäÓï¾ä¹¹Ô췽ʽ£¬Ï£Íû±¾ÎĶÔÄãÓеã°ïÖú¡£
¡¡¡¡ÉùÃ÷£ºÎÄÕÂËùÓ ......
×÷ÕߣºÀÏÍõ Èý¹úÑÝÒ忪ƪһÓïµÀÆÆ£ººÏ¾Ã±Ø·Ö£¡MySQLµÄʹÓÃÒàÊÇÈç´Ë£¬Ãæ¶ÔÓ¦ÓÃÖÐÔ½À´Ô½ÅÓ´óµÄÊý¾ÝÁ¿£¬×îʱ÷ֵĽâ¾ö·½°¸ÊÇShard£¬²»¹ýËüµÄ¸´ÔÓÐÔ²¢²»ÊÇÿ¸ö³ÌÐòÔ±¶¼ÄܼÝÔ¦µÄ£¬Èç¹û°Ñ¼Ü¹¹µÄÑݱä±È×÷ÉúÃüµÄ½ø»¯£¬ÄÇôShard¿ÉÒÔ¿´×öÊDz¸È鶯ÎºÜ¶à¼Ü¹¹×îºóÖ®ËùÒÔʧ°Ü£¬¾ÍÊÇÒòΪËüÃDz½×ÓÂõµÃÌ«´ó£¬Ïë´ÓÔʼÉúÃüÖ±½Ó½ø»¯³É²¸Èé¶ ......
from_unixtime()ÊÇMySQLÀïµÄʱ¼äº¯Êý
dateΪÐèÒª´¦ÀíµÄ²ÎÊý(¸Ã²ÎÊýÊÇUnix ʱ¼ä´Á),¿ÉÒÔÊÇ×Ö¶ÎÃû,Ò²¿ÉÒÔÖ±½ÓÊÇUnix ʱ¼ä´Á×Ö·û´®
ºóÃæµÄ '%Y%m%d' Ö÷ÒªÊǽ«·µ»ØÖµ¸ñʽ»¯
ÀýÈç:
mysql>SELECT from_UNIXTIME( 1249488000, '%Y%m%d' )
->20071120
mysql>SELECT from_UNIXTIME( 1249488000, '%YÄê%mÔ ......
µÇ¼mysql slave·þÎñÆ÷£¬Ö´ÐÐshow slave statusÃüÁһ°ãÏÔʾÒÔϲÎÊýµÄ״̬£»
Slave_IO_State: Waiting for master to send event
Master_Host:192.168.0.1
Master_User:repl_user
Master_Port:3306
Connect_Retry:60
Master_Log_File:mysql-bin.000010
Read_Master_Log_Pos:2562541
Relay_Log_File:mysql-r ......