Auxiliary functions of php

Source: Internet
Author: User
Tags mysql host
Auxiliary functions of php

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


  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 ()."
  5. Echo "mysql client information:". mysql_get_client_info ()."
  6. Echo "current system status:". mysql_stat ()."
  7. Mysql_close ();
  8. ?>

Result: Character set name: latin1mysql server information: 5.1.34-communitymysql host information: localhost via TCP/IPmysql 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.