<thead id="toltr"></thead>
<progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>

  • 歡迎進(jìn)入紅數(shù)信息技術(shù)有限公司官網(wǎng)
    4008088160
    現(xiàn)在的位置:首頁 > 發(fā)布網(wǎng)絡(luò)推廣公司-營銷推廣 > ASP偽靜態(tài)html實現(xiàn)方法
    ASP偽靜態(tài)html實現(xiàn)方法
    信息來源:湖南優(yōu)度網(wǎng)絡(luò)公司  發(fā)布日期:2010/12/27 瀏覽數(shù)量:1334
    文章導(dǎo)讀: ...

    數(shù)據(jù)庫是access,表名article,里面有id,title,content
    config.asp連接數(shù)據(jù)庫文件
    < %
    '功能:asp實現(xiàn)偽靜態(tài)的例子
    '數(shù)據(jù)庫鏈接
    db="data.mdb"
    Set conn = Server.CreateObject("ADODB.Connection")
    connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
    conn.open connstr
    If Err Then
    err.Clear
    Set conn = Nothing
    Response.Write "數(shù)據(jù)庫連接出錯,請檢查連接字串。"
    Response.End
    End If
    '定義新聞閱讀界面的讀取
    Dim News_title,News_content
    Sub ReadNews()
    set rs1=server.createobject("adodb.recordset")
    sql1="select id,title,content from article where id="& ID
    rs1.open sql1,conn,3,3
    News_title=rs1("title")
    News_content=rs1("content")
    rs1.close
    set rs1=Nothing
    End Sub
    % >

    index.asp新聞列表頁


    < !--#include file="config.asp"-- >


      < %
      Set rs=server.CreateObject("adodb.recordset")
      sql="select * from Article"
      rs.open sql,conn,1,1
      do while not rs.eof
      % >
    1. .html">< %=left(trim(rs("title")),30)% >< >
      < %
      rs.movenext
      loop
      rs.close
      set rs=Nothing
      % >

    article.asp新聞內(nèi)容頁
    < !--#include file="config.asp"-- >
    < %
    id=request.QueryString("id")
    If id="" Then
    server_v40=Request.ServerVariables("QUERY_STRING")
    id=Int(replace(replace(server_v40,"/",""),".html",""))
    End If
    Call ReadNews()
    % >

    相關(guān)信息
    • 網(wǎng)絡(luò)營銷培訓(xùn)
    • 微網(wǎng)站
    • 掃二維碼
    • 1
    • 2
    • 3
    • 最新上傳
    • 精品案例
    18973218026
    其他業(yè)務(wù)合作請發(fā)下面郵箱
    郵箱:254596208@qq.com
    地址:湖南省湘潭市岳塘區(qū)霞光東路58號(維也納酒店6樓)
    營銷型網(wǎng)站建設(shè)掃一掃關(guān)注官方微信

    關(guān)注優(yōu)度

    官方微信
    官方微博
    官網(wǎng)首頁
    亚洲日本中文字幕天天跟新,无码综合黄色在线,亚洲人成网站在线观看无码,久久久久亚洲无码
    <thead id="toltr"></thead>
    <progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>