• 应有那个数据库操作类的一个简单实例


    <?php
     header("content-Type: text/html; charset=gb2312");
     include_once("DBHelper.php");
    ?> 
    <!--==========业务逻辑==========-->
    <?php
     $conn = new ADOConnection;
     $conn -> PConnect("localhost","root","weoffice","eoffice");//数据库连接
     $conn -> SetUnicode("set names gb2312");//**设置字符集***
     //比系统登录时间延迟6分钟
     $onlineNum = $conn -> ExecuteQuery("SELECT count(*) as nums
      FROM user_online
      WHERE VISIT_TIME >= date_sub( now( ) , INTERVAL 10
      MINUTE )");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>无标题文档</title>
    <meta http-equiv="content-type" content="text/html" charset="gb2312" />
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    </head>

    <body style="text-align:center; margin-top:150px;">
        <h3>当前在线人数:<span style="color:#ff0000;"><?php echo $onlineNum[0]["nums"]; ?></span></h3>
    </body>
    </html>
    <?php
    $conn -> ConnClose();
    ?>

  • 相关阅读:
    磁盘管理RAID
    06磁盘
    7.30
    作业
    chapter02作业
    2019-07-23
    Tomcat三种运行模式(BIO, NIO, APR)
    Tomcat监控管理
    tomcat中web站点的部署
    Tomcat访问控制
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/1962287.html
Copyright © 2020-2023  润新知