我正在使用Windows 8,并尝试使用sqlserver 2008作为我的数据库。 我安装了sql驱动程序(SQLSRV31.exe),我有
php_sqlsrv_54_ts.dll
php_sqlsrv_55_ts.dll
php_sqlsrv_54_nts.dll
php_sqlsrv_55_nts.dll
php_pdo_sqlsrv_54_ts.dll
php_pdo_sqlsrv_55_ts.dll
php_pdo_sqlsrv_54_nts.dll
php_pdo_sqlsrv_55_nts.dll
提取到我的php / ext。我已将 php.ini 更改为
extension=php_pdo_sqlite.dll
extension=php_sqlsrv.dll
extension=php_sqlsrv_54_ts.dll
extension=php_pdo_sqlsrv_54_ts.dll
同样,这是我的数据库配置
$db['default']['hostname'] = "127.0.0.1";
$db['default']['port'] = 1433;
$db['default']['username'] = 'sa';
$db['default']['password'] = '**';
$db['default']['database'] = 'db_test';
$db['default']['dbdriver'] = 'sqlsrv';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
但我继续收错致命错误:
Call to undefined function sqlsrv_connect() in
C:\xampp\htdocs\test\system\database\drivers\sqlsrv\sqlsrv_driver.php on line 76.
有人可以帮忙吗?