phpÔÚ2003SERVERϵÄÅäÖÃ
Ò»¡¢ÏµÍ³»·¾³¼°³ÌÐò˵Ã÷
1¡¢²Ù×÷ϵͳΪwindows server 2003
2 ¡¢iis°æ±¾Îª6.0
3¡¢php°æ±¾Îª5.2.9,¹Ù·½ÏÂÔصØÖ·: http://www.php.net/downloads.php
4¡¢mysql°æ±¾Îª5.1.34,¹Ù·½ÏÂÔصØÖ·:http://dev.mysql.com/downloads/mysql
¶þ¡¢°²×°iis
1¡¢²åÈëwindows server 2003ϵͳ°²×°¹âÅÌ
2¡¢¿ªÊ¼-¿ØÖÆÃæ°å-Ìí¼Óɾ³ý³ÌÐò-Ìí¼Óɾ³ýwindows×é¼þ
3¡¢ÔÚµ¯³öµÄÌí¼Ó×é¼þ¶Ô»°¿òÖÐÑ¡Ôñ“Ó¦ÓóÌÐò¹ÜÀíÆ÷”
4¡¢¸ù¾ÝÏòµ¼½øÐа²×°
Èý¡¢°²×°php
1¡¢cÅÌн¨Îļþ¼Ðphp,½«php°²×°°üÀïÃæµÄËùÓÐÎļþ¸´ÖƵ½c:\php(×¢ÒâÊǸ´ÖÆÎļþ)
2¡¢ÕÒµ½c:\phpÏ嵀 php.ini-recommended£¬½«ÆäÖØÃüÃûΪphp.ini,Ë«»÷´ò¿ªphp.ini
²éÕÒ”extension_dir”,½«ÆäÖµ¸ÄΪ”c:\php\ext”;¼ÌÐø²éÕÒÈçÏÂÄÚÈÝ£¬²¢È¥µôËûÃÇÇ°ÃæµÄ·ÖºÅ:
;extension=php_bz2.dll
;extension=php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
;extension=php_mysqli.dll
;extension=php_mcrypt.dll
ÐÞ¸ÄÍê³Éºó±£´æphp.ini
3¡¢Ìí¼Ó»·¾³±äÁ¿£¬ÓÒ¼üÎҵĵçÄÔ-ÊôÐÔ-¸ß¼¶-»·¾³±äÁ¿
ÔÚϵͳ±äÁ¿ÖÐн¨phprc,ֵΪc:\php
µã»÷ϵͳ±äÁ¿ÖеÄpath,±à¼Ìí¼ÓÈçÏÂÄÚÈÝ:
c:\php;c:\php\ext
4¡¢£¨×¢Ò⣺´ó²¿·Ö»ú×ÓÕâÒ»²½¿ÉÒÔ²»Òª£©½«c:\phpϵÄphp.ini¸´ÖƵ½c:\windows
½«c:\php\extϵÄÈ«²¿ÄÚÈݸ´ÖƵ½c:\windows\system32
5¡¢½«c:\phpϵÄlibmysql.dllºÍlibmcypt.dll¸´ÖƵ½c:\windows\system32
ËÄ¡¢ÈÃiisÖ§³Öphp
1¡¢¿ªÊ¼-¹ÜÀí¹¤¾ß-internetÐÅÏ¢·þÎñ(iis)¹ÜÀíÆ÷
2¡¢ÓÒ¼üĬÈÏÍøÕ¾-ÊôÐÔ-Ö÷Ŀ¼-ÅäÖã¬ÔÚ”»º´æisapiÀ©Õ¹”Ç°´ò√
µã»÷“Ìí¼Ó”£¬Ñ¡Ôñ¿ÉÖ´ÐÐÎļþΪc:\php\php5isapi.dll,À©Õ¹ÃûΪ.php
3¡¢ÓÒ¼üĬÈÏÍøÕ¾-ÊôÐÔ-Îĵµ£¬Ìí¼Óindex.php
4¡¢µã»÷”web·þÎñÀ©Õ¹”£¬Ìí¼ÓÒ»¸öеÄweb·þÎñÀ©Õ¹£¬À©Õ¹ÃûΪphp£¬ÒªÇóµÄÎļþ
ÇëÑ¡Ôñc:\php\php5isapi.dll
5¡¢²âÊÔphp
ÔÚĬÈÏÍøÕ¾µÄĿ¼ÏÈн¨index.php,Ìí¼ÓÈçÏÂÄÚÈÝ £º
<?php phpinfo();?>
·ÃÎÊ:http://localhost/index.php¿É¿´µ½²âÊÔÒ³
Îå¡¢°²×°mysql
mysqlÓÐÏêϸµÄ°²×°Ïòµ¼£¬´ó¼Ò¸ù¾ÝÏòµ¼°²×°ÅäÖþÍokÁË
Ïà¹ØÎĵµ£º
ÔÚlinuxÏÂͨ¹ýsvn¸üÐÂÁËÒ»¸öphpÎļþ£¬Ä¿µÄÊÇÏëͨ¹ýÖ´ÐÐÕâ¸öÎļþÀ´¶ÁÊý¾Ý²åÈëµ½Êý¾Ý¿â¡£ÔÚÆäÖеļ¸Ì¨Ö´ÐÐûÓÐÎÊÌ⣬ÆäÖÐһ̨¾Í·¢ÏÖÁËCould not open input fileÕâ¸ö´íÎ󣬺óÀ´²éÕÒ×ÊÁϲŷ¢ÏÖÔÀ´ÊÇÎļþ¸ñʽµÄÎÊÌ⣬³ö´íʱÎļþ¸ñʽÊÇdos£¬¿ÉÒÔÔÚviÖÐÓÃ:set ffÀ´²é¿´£¬Èç¹ûÊÇdos¸ñʽ£¬ÄÇôÔòÓÃ:set ff=unixÀ´ÉèÖÃеĸñʽ£¬ÕâÑ ......
×î½üÓÐÒ»¸öÏã¸ÛµÄ¾ÆµêÌá³öÐèÇó,Òªµ½¾ÆµêÒµÄÚµÄÉÌÎñÖÐÐÄʵÐмƷÑÉÏÍø, ÌṩÁËÈçϼ¼Êõ·½°¸:
1¡¢Éèһ̨CENTOS5µÄ»úÆ÷×öΪ·ÓÉ£¬°ÑÐèÒª¼Æ·ÑµÄ»úÆ÷¶¼ÉèΪÓô˷þÎñÆ÷×öÍø¹Ø¡£
2¡¢·þÎñÆ÷¿ªÆôIPTABLE£¬Í¨¹ýIPTABLE¿ØÖÆÄܲ»ÄÜʹÓû¥ÁªÍø¡£
¼Ç¼ÏÂÒÔϼ¼ÊõÒªµã:
Ò»¡¢ php¿ÉÒÔͨ¹ýshell_execÀ´Ö´ÐÐshellÖ¸Áµ«iptablesµÄÖ¸ÁîÊÇr ......
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/20100411/56.html
ÔÚPHPÖÐʹÓÃforeachº¯Êý¿ÉÒÔ±éÀúÊý×é¡£Foreach½öÄÜÓÃÓÚÊý×飬Óï·¨ÈçÏ£º
Foreach(array as $value) statements
Foreach(array as $key=>$value) statement
µÚÒ»ÖÖÓï·¨±éÀúÊý×éʱ£¬Ã¿´ÎÑ»·Ê±£¬µ±Ç°µ¥ÔªµÄÖµ±»¸³¸ø$value£¬Êý×éÄÚ²¿µÄÖ¸ÕëÏòÇ° ......
Ê×ÏÈ˵×î¸ù±¾µÄ½â¾ö·½·¨£º
ÊÖ »ú·ÃÎÊʱ£¬»á¸½´ø·¢ËÍuser-agentÐÅÏ¢£¬Õâ¸öÐÅÏ¢ÀïÃæ»áÓÐÊÖ»úºÅÂëÐÅÏ¢£¬ÄÇôÈç¹ûÄÜÈ¡µÃÊÖ»úºÅÂ룬Ôò¿ÉÒԿ϶¨ÊÇͨ¹ýÊÖ»úwap·ÃÎʵġ£µ«ÊÇÄ¿Ç°ÖÐ ¹úÒƶ¯ÒѾÆÁ±ÎÁËuser-agentÐÅÏ¢£¬ËùÒÔ»ñÈ¡²»µ½ÊÖ»úºÅÂë¡£ÓйØϵµÄÅóÓÑ¿ÉÒÔÁªÏµÒƶ¯¹«Ë¾£¬°ÑwapÍøÕ¾·þÎñÆ÷µÄipÌá½»¸øÖйúÒƶ¯£¬¼ÓÈë°×Ãûµ¥ ºó¼´¿ÉÈ¡µ ......
http://www.111cn.net/phper/19/dd73e6624c92e49e7755d3b43719677d.htm
ºÜ¶àÍøÕ¾ÔÚÊ×Ò³ÉÏ×öһЩÁ´½Ó£¬ÈÃÓû§À´Ñ¡Ôñ½«Òª·ÃÎʵĸ÷×ÔµÄÓïÑÔÒ³Ã棬ÈÃÖйúÈËÑ¡Ôñ“ÖÐÎÄ”£¬º«¹úÈËÑ¡Ôñ“³¯ÏÊÓ¬µÈµÈ¡£ÄÇôÄܲ»ÄÜ×ö³ÌÐòÀ´×Ô¶¯°ïÖúÑ¡ÔñÄØ£¿
´ð°¸Êǿ϶¨µÄ£¬´ó¼Ò¶¼ÔÚÓÃgoogle£¬ÄãÓÃÖÐÎÄϵͳ´ò¿ªgoogleµÄÊ×Ò³ ......