亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

FSO 讀出TXT文件

 更新時(shí)間:2006年10月28日 00:00:00   作者:  
<!--#include file="dbconn.asp"-->
<%
function ReadFile(filename)
on error resume next
err.clear
'ASP的一種校錯(cuò)方法
Const ForReading = 2
Const Create = false
Dim FSO
DIM TS
DIM filepath
DIM thefile
Dim content

'---------------操作地址

Set FSO=server.createobject("scripting.filesystemobject")
filepath=server.MapPath("temp") ./記錄本存放的文件夾

if err.number<>0 then
response.Write "目錄不存在"
response.End
end if

'filename="test.txt" ---------test.txt為你從數(shù)據(jù)庫里讀出的文件名
thefile=filepath&"/"&filename
Set TS = FSO.OpenTextFile(thefile,1)

do until Ts.AtEndOfStream
Response.Write (""&TS.ReadLine&"")
response.write("<br>")
loop

Set TS = Nothing
Set FSO = Nothing
end function
%>

<%
dim id
dim filename
id=6
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from yuan where id="&id
rs.open sql,cn,1,1
filename=rs("fileload")
%>

<% readfile(filename) %>


相關(guān)文章

最新評(píng)論