Home  >  Article  >  Backend Development  >  php auxiliary function function

php auxiliary function function

WBOY
WBOYOriginal
2016-07-25 09:11:43975browse

Some auxiliary functions of php: mysql_client_encoding() mysql_get_server_info() mysql_get_host_info() mysql_get_client_info() mysql_stat()

Example:

  1. $link=mysql_connect("localhost","root","root") or die("couldn't connect:".mysql_error());
  2. echo "Character set Name: ".mysql_client_encoding()."
    ";
  3. echo "mysql server information: ".mysql_get_server_info()."
    ";
  4. echo "mysql host information: ".mysql_get_host_info()."< ;br>";
  5. echo "mysql client information: ".mysql_get_client_info()."
    ";
  6. echo "Current system status: ".mysql_stat()."
    ";
  7. mysql_close( );
  8. ?>
Copy code

Result: Character set name: latin1 mysql server information: 5.1.34-community mysql host information: localhost via TCP/IP mysql client information: 5.0.51a Current system status: Uptime: 2539 Threads: 1 Questions: 17 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 1 Queries per second avg: 0.6



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn