« sqlsrv_send_stream_data
日付および時刻関連 »

sqlsrv_server_info

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

sqlsrv_server_info — Returns information about the server

説明

function sqlsrv_server_info(resource $conn): array

Returns information about the server.

パラメータ

conn

The connection resource that connects the client and the server.

戻り値

Returns an array as described in the following table:

Returned Array
CurrentDatabase The connected-to database.
SQLServerVersion The SQL Server version.
SQLServerName The name of the server.

例

例1 sqlsrv_server_info() example

<?php
$serverName = "serverName\sqlexpress";
$conn = sqlsrv_connect( $serverName);
if( $conn === false ) {
     die( print_r( sqlsrv_errors(), true));
}

$server_info = sqlsrv_server_info( $conn);
if( $server_info )
{
    foreach( $server_info as $key => $value) {
       echo $key.": ".$value."<br />";
    }
} else {
      die( print_r( sqlsrv_errors(), true));
}
?>

参考

関連キーワード:
server   sqlsrv   info   information   about   conn   client   serverName   resource   connection   print   errors   send   stream   日付   時刻   関連   available   connects   described   following   table   Returned   CurrentDatabase   connected
関連する関数・ページ:
function.sqlsrv-client-info   function.sqlsrv-close   function.sqlsrv-send-stream-data   ref.sqlsrv   function.sqlsrv-get-field   function.sqlsrv-query