Home >Backend Development >PHP Tutorial >解析php5配置使用pdo_php技巧

解析php5配置使用pdo_php技巧

WBOY
WBOYOriginal
2016-05-17 08:57:051546browse

1. 检查php扩展库中是否存在php_pdo.dll(当调用MsSQL同时还需要php_pdo_mssql.dll;当调用MySQL同时还需要php_pdo_mysql.dll).

2. 打开php.ini配置文件,加入:

指定扩展库
extension_dir="C:\Program Files (x86)\PHP\ext"

[PHP_PDO]
extension=php_pdo.dll

[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll

[PHP_PDO_MSSQL]
extension=php_pdo_mssql.dll

打开phpinfo发现多了pdo及对应扩展,OK下面可以PDO进行数据连接访问了 ~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn