文字

maxdb_stat

maxdb::stat

(PECL maxdb >= 1.0)

maxdb_stat -- maxdb::statGets the current system status

说明

过程化风格

string maxdb_stat ( resource $link )

面向对象风格

string maxdb::stat ( void )

maxdb_stat() returns a string containing several information about the MaxDB server running.

返回值

A string describing the server status. FALSE if an error occurred.

范例

Example #1 面向对象风格

<?php
$maxdb 
= new  maxdb ( "localhost" "MONA" "RED" "DEMODB" );


if ( maxdb_connect_errno ()) {
   
printf ( "Connect failed: %s\n" maxdb_connect_error ());
   exit();
}

printf  ( "System status: %s\n" $maxdb -> stat ());

$maxdb -> close ();
?>

Example #2 过程化风格

<?php
$link 
maxdb_connect ( "localhost" "MONA" "RED" "DEMODB" );


if ( maxdb_connect_errno ()) {
   
printf ( "Connect failed: %s\n" maxdb_connect_error ());
   exit();
}

printf ( "System status: %s\n" maxdb_stat ( $link ));

maxdb_close ( $link );
?>

以上例程的输出类似于:

System status: Kernel    7<...>

参见

  • maxdb_get_server_info() - Returns the version of the MaxDB server
上一篇: 下一篇: