Home > php教程 > php手册 > body text

解析php5配置使用pdo

WBOY
Release: 2016-06-13 11:43:20
Original
1001 people have browsed it

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进行数据连接访问了 ~

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!