如何让PHP支持MYSQL,按照下面的方法就可以了,挺简单的。就是我们不会去记住他们
1.在c:/windows里建个my.ini 内容:
#This File was made using the WinMySQLAdmin 1.4 Tool
#2004-03-15 00:00:00
#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions
[mysqld]
basedir=D:/usr/local/mysql //写你自己的路径
#bind-address=127.0.0.1
datadir=D:/usr/local/mysql/data //写你自己的路径
#language=D:/usr/local/mysql/share/your language directory //写你自己的路径
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=D:/usr/local/mysql/bin/mysqld-nt.exe //写你自己的路径
user=root
password=
2.要配置mysql的环境变量!
3.在apache的文件夹里的conf/httpd.conf里面加上:
LoadModule php5_module D:/usr/local/php/php5apache.dll
#AddModule mod_php5.c
AddType application/x-httpd-php .php
Action application/x-httpd-php "D:/usr/local/php/php.exe" //你自己PHP的地址
看完后是否觉得挺简单的吧。。。。。多支持本站下