• λ我爱Aspx >> C#.Net >> PHP 留言簿(带Oracle数据库分页的显示功能)_PHP实例
  • PHP 留言簿(带Oracle数据库分页的显示功能)_PHP实例

  • :aspxer  Դ:internet  :2007-4-28 23:46:00  ؼ:数据库,数据
  • Header("Location: ./index.php");

    exit;

    这二行让浏览器重导到 index.php。让使用者看到他的新留言,就完成了留言的动作。

    之后来看看留言的内容显示程式。

    <html>

    <head>

    <meta content="text/html; charset=gb2312"

    http-equiv=Content-Type>

    <title>留言版</title>

    </head>

    <body bgcolor=ffffff>

    <?php

    file://---------------------------

    // 留言显示程式 index.php

    // Author: Wilson Peng

    // Copyright (C) 2000

    file://---------------------------

    $WebmasterIPArray =

    ay(

    "10.0.1.30", // 管理人员甲的机器 IP

    "10.0.2.28" // 管理人员乙的机器 IP

    );

    $WebmasterIP=false;

    for ($i=0; $i<Count($WebmasterIPArray); $i++) {

    if ($REMOTE_ADDR == $WebmasterIPArray[$i]) $WebmasterIP=true;

    }

    putenv("ORACLE_SID=WWW");

    putenv("NLS_LANG=american_taiwan.zht16big5");

    putenv("ORACLE_HOME=/home/oracle/product/7.3.2");

    putenv("LD_LIBRARY_PATH=/home/oracle/product/7.3.2/lib");

    putenv("ORA_NLS=/home/oracle/product/7.3.2/ocommon/nls/admin/data");

    putenv("ORA_NLS32=/home/oracle/product/7.3.2/ocommon/nls/admin/data");

    $handle=ora_logon("user38@WWW","iam3849") or die;

    $cursor=ora_open($handle);

    ora_commitoff($handle);

    $query="SELECT serial, ref, id, alias, ip, TO_CHAR(msgdate, 'yyyy/mm/dd hh:mi:ss'), email, msg FROM guestbook where flag='1' order by msgdate desc";

    Ҷƪл˵?
  • һƪVisualInterDev6.0七种实现分页显示的方法_ASP技巧
    һƪ用PHP实现ODBC数据分页显示一例_PHP技巧