sqlsrv_istemci_bilgisi

PHP sürücüsünü indirme

Bağlantı ve istemci yığını hakkında bilgi döndürür.

Syntax

  
sqlsrv_client_info( resource $conn)  

Parametreler

$conn: İstemcinin bağlandığı bağlantı kaynağı.

Dönüş Değeri

Aşağıdaki tabloda tanımlanan anahtarlara sahip bir ilişkilendirilmiş dizi, ya da bağlantı kaynağı null ise yanlış olabilir.

SQL Server için PHP sürümleri 3.2 ve 3.1 için:

Key Description
DriverDllName MSODBCSQL11.DLL (ODBC Sürücü 11 SQL Server için)
DriverODBCVer ODBC versiyonu (xx.yy)
DriverVer ODBC Driver 11 for SQL Server DLL version:

xx.yy.zzzz (Microsoft Drivers for PHP for SQL Server sürüm 3.2 veya 3.1)
ExtensionVer php_sqlsrv.dll versiyonu:

3.2.xxxx.x (Microsoft Drivers for PHP for SQL Server version 3.2 için)

3.1.xxxx.x (Microsoft Drivers for PHP for SQL Server version 3.1 için)

SQL Server için PHP sürümleri 3.0 ve 2.0 için:

Key Description
DriverDllName SQLNCLI10.DLL (SQL Server sürüm 2.0 için PHP için Microsoft sürücüler)
DriverODBCVer ODBC versiyonu (xx.yy)
DriverVer SQL Server Native Client DLL sürümü:

10.50.xxx (SQL Server sürüm 2.0 için PHP için Microsoft sürücüler)
ExtensionVer php_sqlsrv.dll versiyonu:

2.0.xxxx.x (Microsoft Drivers for PHP for SQL Server sürüm 2.0)

Example

Aşağıdaki örnek, örnek komut satırından çalıştırıldığında istemci bilgilerini konsola yazar. Örnekte SQL Server'ın yerel bilgisayarda yüklü olduğu varsayılır. Örnek komut satırından çalıştırıldığında tüm çıkış konsola yazılır.

<?php  
/*Connect to the local server using Windows Authentication and   
specify the AdventureWorks database as the database in use. */  
$serverName = "(local)";  
$conn = sqlsrv_connect( $serverName);  
  
if( $conn === false )  
{  
     echo "Could not connect.\n";  
     die( print_r( sqlsrv_errors(), true));  
}  
  
if( $client_info = sqlsrv_client_info( $conn))  
{  
       foreach( $client_info as $key => $value)  
      {  
              echo $key.": ".$value."\n";  
      }  
}  
else  
{  
       echo "Client info error.\n";  
}  
  
/* Close connection resources. */  
sqlsrv_close( $conn);  
?>