我有以下代码从本地PHP连接到Mysql数据库(Windows,使用IIS),
$dbhost = "xxxx.database.windows.net";
$dbname = "yyyy";
$dbuser = "uuuu";
$dbpass = "pppp";
$driver = "sqlsrv";
$connection = new PDO("$driver:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);
php信息说:
Loaded Configuration File C:\Program Files (x86)\IIS Express\PHP\v5.6\php.ini
我在这个php.ini文件中有以下内容
[WebPIChanges]
error_log=C:\Windows\temp\PHP56ForIISExpress_errors.log
upload_tmp_dir=C:\Windows\temp
session.save_path=C:\Windows\temp
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
date.timezone=Europe/Minsk
extension_dir="C:\Program Files (x86)\iis express\PHP\v5.6\ext\"
[ExtensionList]
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll
extension=php_sqlsrv.dll
此文件存在:C:\ Program Files(x86)\ IIS Express \ PHP \ v5.6 \ ext \ php_pdo_mysql.dll
为什么我收到“找不到驱动程序”错误?我的应用程序池可以运行32位或64位。