⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 file.asp

📁 在flash中
💻 ASP
字号:
<%
Set MyFileObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyTextFile = MyFileObject.CreateTextFile("G:\写作\flashxmlbbs\login.xml", 8, TRUE)
MyTextFile.WriteLine(Request.Form)

set objDom = server.CreateObject("microsoft.xmldom")
objDom.loadxml(Request.Form)
set objid = objdom.documentElement.SelectSingleNode("//FILE/ID")
id = objid.text

'判断
set conn=Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/xmlbbs/xmlbbs.mdb")
set rs=Server.CreateObject("ADODB.Recordset")
strSql="select * from FileInfo where id = " & id
rs.open strSql,conn, 1, 1     
title = ""
author = ""
content = ""
if not(rs.bof and rs.eof) then
    id = rs("id")
    title = rs("title")
    author = rs("author")
    content = rs("content")
end if

'要单独处理回复
rs.close
reply = ""
strSql="select * from FileInfo where fid = " & id
rs.open strSql,conn, 1, 1     
do while not rs.eof
reply = reply & " " & rs("content")
rs.moveNext
loop
rs.close
conn.close
'返回
response.write("<FILE id=""" & id & """ title=""" & title & """ author=""" & author & """ content=""" & content & """ reply=""" & reply & """></FILE>")
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -