.

从文本中读取数据显示在网页上
分类:电脑知识 发表于:2010-06-22 21:30:09 评论(0)


<%

function book_DuquFile(str)

set fs=server.createobject("scripting.filesystemobject")

set txt=fs.opentextfile(server.mappath(str),1,true)

if not txt.atendofstream then

book_DuquFile=txt.ReadAll

end if

end function

sub book_SaveFile(filename,str)

Set fso=Server.CreateObject("Scripting.FileSystemObject")

Set fso=fso.OpenTextFile(server.mappath(filename),2,True)

fso.Write str

fso.Close

fso=nothing

end sub

Function book_Folder(strPath)

Set fs=Server.CreateObject("Scripting.FileSystemObject")

if not fs.FolderExists(Server.MapPath(strPath)) then

fs.createFolder(Server.MapPath(strPath))

end if

fs.Close

set fs=nothing

end function

%>

<%

content=book_DuquFile("路径/"&"名称"&".txt")

response.write content

%>

  
邮箱: 密码: