当前位置:Gxlcms > PHP教程 > php的辅助函数功能

php的辅助函数功能

时间:2021-07-01 10:21:17 帮助过:5人阅读

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 "字符集的名称: ".mysql_client_encoding()."
    ";
  3. echo "mysql服务器信息: ".mysql_get_server_info()."
    ";
  4. echo "mysql主机信息: ".mysql_get_host_info()."
    ";
  5. echo "mysql客户机信息: ".mysql_get_client_info()."
    ";
  6. echo "当前系统的状态: ".mysql_stat()."
    ";
  7. mysql_close();
  8. ?>

结果: 字符集的名称: latin1 mysql服务器信息: 5.1.34-community mysql主机信息: localhost via TCP/IP mysql客户机信息: 5.0.51a 当前系统的状态: Uptime: 2539 Threads: 1 Questions: 17 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 1 Queries per second avg: 0.6

人气教程排行