请教ASP中如何读取.dat的文件?
来源:百度文库 编辑:神马文学网 时间:2024/04/28 19:08:19
以文本方式查看主题
- 我的帮助论坛(主要探讨 VFP 及其它编程技术) (http://www.gz9f.com/bbs/index.asp)
-- CGI、ASP、JAVA论坛 (http://www.gz9f.com/bbs/list.asp?boardid=8)
---- 请教ASP中如何读取.dat的文件? (http://www.gz9f.com/bbs/dispbbs.asp?boardid=8&id=200853)
-- 作者:pangcg
-- 发布时间:2003-4-2 11:29:00
-- 请教ASP中如何读取.dat的文件?
请教各位大虾,ASP中如何读取.dat的文件?
-- 作者:初级VFP
-- 发布时间:2003-4-2 22:44:00
--
<%
\‘以下为读取一行
Function file_Getword(filename)
Dim fileobj,thisfile
set fileobj=createobject("scripting.filesystemobject")
set thisfile=fileobj.opentextfile(updatefile,1,false)
file_Getword=thisfile.readline
thisfile.close
set fileobj=nothing
end function
response.write "文件内容:"&file_Getword(filename)
\‘以下为读取整个文件
dim fname,FS,FGetfile,Readfile,Cstr
fname="路径+文件"
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set FGetfile = FS.Getfile(fname)
Set Readfile = FGetfile.OpenAsTextStream(1,0)
Cstr=""
Do while Readfile.AtEndOfLine<>True
Cstr=Cstr&Readfile.ReadLine&chr(13)&chr(10)
Loop
Readfile.close
set FGetfile = nothing
set Readfile = nothing
Set FS = nothing
response.write Cstr
%>
- 我的帮助论坛(主要探讨 VFP 及其它编程技术) (http://www.gz9f.com/bbs/index.asp)
-- CGI、ASP、JAVA论坛 (http://www.gz9f.com/bbs/list.asp?boardid=8)
---- 请教ASP中如何读取.dat的文件? (http://www.gz9f.com/bbs/dispbbs.asp?boardid=8&id=200853)
-- 作者:pangcg
-- 发布时间:2003-4-2 11:29:00
-- 请教ASP中如何读取.dat的文件?
请教各位大虾,ASP中如何读取.dat的文件?
-- 作者:初级VFP
-- 发布时间:2003-4-2 22:44:00
--
<%
\‘以下为读取一行
Function file_Getword(filename)
Dim fileobj,thisfile
set fileobj=createobject("scripting.filesystemobject")
set thisfile=fileobj.opentextfile(updatefile,1,false)
file_Getword=thisfile.readline
thisfile.close
set fileobj=nothing
end function
response.write "文件内容:"&file_Getword(filename)
\‘以下为读取整个文件
dim fname,FS,FGetfile,Readfile,Cstr
fname="路径+文件"
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set FGetfile = FS.Getfile(fname)
Set Readfile = FGetfile.OpenAsTextStream(1,0)
Cstr=""
Do while Readfile.AtEndOfLine<>True
Cstr=Cstr&Readfile.ReadLine&chr(13)&chr(10)
Loop
Readfile.close
set FGetfile = nothing
set Readfile = nothing
Set FS = nothing
response.write Cstr
%>
请教ASP中如何读取.dat的文件?
电脑中“index.dat”文件的秘密
如何9用asp读取Excel文件(比较全面)
如何读取损坏光盘内的文件
如何读取损坏光盘内的文件
如何读取收藏夹文件的URL(眩晕中..) VB / API - CSDN社区 commun...
我如何从文件读取文本,然后使用我刚读取的文本重命名该文件?
我如何从文件读取文本,然后使用我刚读取的文本重命名该文件?
ASP.net中上传文件的操作
ASP.net中上传文件的操作
如何用asp读取Excel文件 - 中软网博客
如何用asp读取Excel文件(比较全面)
如何用99asp读取Excel文件(比较全面)
什么是DAT文件, 如何打开DAT文件_一弯柳叶
泄露上网行踪的“index.dat”文件
泄露上网行踪的“index.dat”文件
泄露上网行踪的“index.dat”文件.............
ASP.NET中web.config文件的配置
ASP 中实现文件上传方法的研究
ASP.NET中web.config文件的配置
在ASP.NET中设置html文件的访问验证
用 PHP 读取文件的正确方法
用 PHP 读取文件的正确方法
泄露访问过网址的文件indes.dat