略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: sqlsrv_client_info

2024-12-21

sqlsrv_client_info

(No version information available, might only be in Git)

sqlsrv_client_infoReturns information about the client and specified connection

说明

sqlsrv_client_info(resource $conn): array

Returns information about the client and specified connection

参数

conn

The connection about which information is returned.

返回值

Returns an associative array with keys described in the table below. Returns false otherwise.

Array returned by sqlsrv_client_info
Key Description
DriverDllName SQLNCLI10.DLL
DriverODBCVer ODBC version (xx.yy)
DriverVer SQL Server Native Client DLL version (10.5.xxx)
ExtensionVer php_sqlsrv.dll version (2.0.xxx.x)

范例

示例 #1 sqlsrv_client_info() example

<?php
$serverName 
"serverName\sqlexpress";
$connOptions = array("UID"=>"username""PWD"=>"password");
$conn sqlsrv_connect$serverName$connOptions );

if( 
$conn === false ) {
    die( 
print_rsqlsrv_errors(), true));
}

if( 
$client_info sqlsrv_client_info$conn)) {
    foreach( 
$client_info as $key => $value) {
        echo 
$key.": ".$value."<br />";
    }
} else {
    echo 
"Error in retrieving client info.<br />";
}
?>

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.sqlsrv-client-info.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3