我有MSSQL Server 2008中,微軟的Windows Server 2008 RC2和PHP 5.4PHP IIS7 MSSQL調用未定義功能sqlsrv_connect
php.info都行
[PHP_PDO_SQLSRV_54_NTS]
extension=php_pdo_sqlsrv_54_nts.dll
[PHP_PDO_ODBC]
extension=php_pdo_odbc.dll
[PHP_SYBASE_CT]
extension=php_sybase_ct.dll
[PHP_SQLSRV_54_NTS]
extension=php_sqlsrv_54_nts.dll
PHP的信息在這裏找到http://89.111.180.28/index.php
我看到與擴展的php.ini線,但我沒有看到在php.info擴展SQLSRV線...
用於連接到MSSQL服務器I使用腳本
$conn_array = array (
"UID" => "user",
"PWD" => "passw",
"Database" => "database",
"Encrypt" => 1,
"TrustServerCertificate" => 1) ;
$conn2 = sqlsrv_connect('localhost' , $conn_array);
if ($conn2)
{
echo 'MSSQL Connection successful';
}
else
{
die(print_r(sqlsrv_errors(), true));
}
sqlsrv_close($conn2);
但我看到的錯誤:
Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\89.111.180.28\index.php on line 18
請告訴我爲什麼我有錯誤,以及如何作出正確的?
p.s .:服務器已重新啓動。
您確實下載了'SQLSRV30.EXE'文件,對吧? http://www.microsoft.com/en-us/download/details.aspx?id=20098 –
@RocketHazmat是的,我安裝了這個 –