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");

/* check connection */
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");

/* check connection */
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<...>

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top