XPÏÂIISÅäÖÃPHP ºÍMySQL
µÚÒ»²½£º ÏÂÔغͰ²×°PHP
php°æ±¾: php-5.2.10-Win32.zip
1.½âѹphpÎļþµ½ c:\php
2.½«phpÎļþ¼ÐÏ php.ini-dist ¸ÄÃûΪ php.ini ,È»ºóÕÒµ½extension_dir = "./" ¸ÄΪ extension_dir = "c:\php\ext" (´ó¸ÅÔÚ461ÐÐ)
3.È¥µô;extension=php_mysql.dll Ç°µÄ";"×¢ÊÍ·ûºÅ (´ó¸ÅÔÚ589ÐÐ)(Èç¹ûûÓеĻ°¿ÉÒÔ¼ÓÉÏÕâÃû»°.)
4.¸´ÖÆphp.iniµ½C:\WINDOWS
ÔÙ¸´ÖÆphp5ts.dllºÍlibmysql.dllµ½WINDOWS\system32\ÖÐ
µÚ¶þ²½£º ÅäÖÃIIS
1.ÅäÖÃISAPIɸѡ
1)¿ªÊ¼--¿ØÖÆÃæ°å--¹ÜÀí¹¤¾ß----£¨Ë«»÷£©Internet ÐÅÏ¢·þÎñ--Ò»´ÎÑ¡ÔñĬÈÏÍøÕ¾
2£© ÓÒ¼üĬÈÏÍøÕ¾ÊôÐÔ---½«¿´µ½Ä¬ÈÏÊôÐÔ¶Ô»°¿ò---Ñ¡ÔñISAPIɸѡÆ÷---Ìí¼ÓÒ»¸öеÄɸѡÆ÷--- Ãû³ÆΪphp
---¿ÉÖ´ÐÐÎļþΪ£¨C:\php\php5isapi.dll£©(ÕâÀïΪPHPÎļþ·¾¶)----È·¶¨
3£©½øÈëÖ÷Ŀ¼----Ñ¡ÔñÅäÖõ¯³ö¶Ô»°¿ò--- Ñ¡ÔñÌí¼Ó¶Ô»°¿ò----- À©Õ¹ÃûΪ.php---¿ÉÖ´ÐÐÎļþ·¾¶ÎªC:\php\php5isapi.dll---È·¶¨
4£©½øÈëÎĵµ---Ñ¡ÔñÌí¼Ó¶Ô»°¿ò---ĬÈÏÎĵµÃûΪindex.php²¢ÇÒÉèΪ×î¸ß£¨ÉÏÒƵ½¶¥²¿£©---È·¶¨¾Í¿ÉÒÔÁË¡£
5£©ÖØÆôIIS£¬
ÖØÆô·½·¨£º
ÔÚÔËÐÐÀïÃæÒÀ´ÎÊäÈë
net stop w3svc
net stop iisadmin
net start w3svc
ÏÖÔÚĬÈÏÕ¾µã¿ÉÒÔÖ§³ÖPHPÁË£¬ÏòÆäÖÐÌí¼ÓÒ»¸öÄÚÈÝΪ<% echo phpinfo() >µÄtest.phpÎļþ£¬ÔÚIIS¹ÜÀíÆ÷ÖÐÓÒ¼ü²¢µãä¯ÀÀ£¬ Èç ¹û¿ÉÒÔ¿´µ½ÈçϵÄÄÚÈÝ£¬ËµÃ÷PHPÒÑÅäÖóɹ¦¡£
Ïà¹ØÎĵµ£º
phpÁ¬½Óaccess
$conn=new COM("ADODB.Connection");
$dsn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=".realpath("data.mdb").";Uid=Admin; Pwd=BDC2002Data;";
$conn->open($dsn);
$sql="select * from dict";
$rs=$conn->Execute($sql);
$row="0";
while(!$rs->EO ......
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 ......
1.ʹÓà ip2long() ºÍ long2ip() º¯ÊýÀ´°Ñ IP µØַת»¯³ÉÕûÐÍ´æ´¢µ½Êý¾Ý¿âÀï¡£ÕâÖÖ·½·¨°Ñ´æ´¢¿Õ¼ä½µµ½Á˽ӽüËÄ·ÖÖ®Ò»£¨char(15) µÄ 15 ¸ö×Ö½Ú¶ÔÕûÐ뵀 4 ¸ö×Ö½Ú£©£¬¼ÆËãÒ»¸öÌض¨µÄµØÖ·ÊDz»ÊÇÔÚÒ»¸öÇø¶ÎÄÚÒ³¸ü¼òµ¥ÁË£¬¶øÇÒ¼Ó¿ìÁËËÑË÷ºÍÅÅÐòµÄËٶȣ¨ËäÈ»ÓÐʱ½ö½öÊÇ¿ìÁËÒ»µã£©¡£
2.ÔÚÑéÖ¤ email µØÖ·µÄʱºòʹÓà checkdnsrr() º ......
Ò»¡¢Ê²Ã´ÊÇPHP£¿PHPµÄ¸ÅÄîºÍ¼ò½é
¡¡¡¡PHPÊÇÒ»ÖÖÒ×ÓÚѧϰºÍʹÓõķþÎñÆ÷
¶Ë½Å±¾ÓïÑÔ¡£Ö»ÐèÒªºÜÉٵıà³Ì֪ʶÄã¾ÍÄÜʹÓÃPHP½¨Á¢Ò»¸öÕæÕý½»»¥µÄWEBÕ¾µã¡£±¾½Ì³Ì
²¢²»ÏëÈÃÄãÍêÈ«Á˽âÕâÖÖÓïÑÔ£¬Ö»ÊÇÄÜʹÄ㾡¿ì¼ÓÈ뿪·¢¶¯Ì¬webÕ¾µãµÄÐÐÁС£ÎÒ¼Ù¶¨ÄãÓÐһЩHTML£¨»òÕßHTML±à¼Æ÷£©µÄ»ù±¾ÖªÊ¶ºÍһЩ±à³Ì˼Ïë¡£
¡¡¡¡1.¼ò½é
¡¡¡¡PH ......
ereg()
×Ö·û´®±È¶Ô½âÎö¡£
Óï·¨: int ereg(string pattern, string string, array [regs]);
·µ»ØÖµ: ÕûÊý/Êý×é
º¯ÊýÖÖÀà: ×ÊÁÏ´¦Àí
ÄÚÈÝ˵Ã÷
±¾º¯ÊýÒÔ pattern µÄ¹æÔòÀ´½âÎö±È¶Ô×Ö·û´® string¡£±È¶Ô½á¹û·µ»ØµÄÖµ·ÅÔÚÊý×é²ÎÊý regs Ö®ÖУ¬regs[0] ÄÚÈݾÍÊÇÔ×Ö·û´® string¡¢regs[1] ΪµÚÒ»¸öºÏºõ¹æÔòµÄ×Ö·û´®¡¢regs[2 ......