www.gusucode.com > 迅雷看看小偷电影程序源码+后台(首页去弹窗) > 迅雷看看小偷电影程序源码+后台(首页去弹窗)\code\guanli\fso.asp
<% Function FSOFileRead(Template_Name) Dim objFSO,objCountFile,FiletempData Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objCountFile = objFSO.OpenTextFile(Server.MapPath(Template_Name),1,True) If objCountFile.AtEndOfStream = false Then FSOFileRead = objCountFile.ReadAll objCountFile.Close Set objCountFile=Nothing Set objFSO = Nothing End Function Function CreateFolder(fldr) on error resume next Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.CreateFolder(Server.MapPath(fldr)) CreateFolder = f.Path Set f=nothing Set fso=nothing End Function Function createhtml(path,str) GetFold=split(path,"/") For e=0 to Ubound(GetFold)-1 if fldr="" then fldr=GetFold(e) else fldr=fldr&"/"&GetFold(e) end if If IsFolder(fldr)=false then CreateFolder fldr End if Next Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fout = fso.CreateTextFile(server.mappath(path)) fout.Write str fout.close set fso = nothing End Function Function delfolder(path) If IsFolder(path)=True Then Set fso = CreateObject("Scripting.FileSystemObject") fso.DeleteFolder(server.mappath(path)) set fso = Nothing End If End Function Function delfile(path) If IsExists(path)=True Then set fso = server.CreateObject("Scripting.FileSystemObject") fso.DeleteFile(server.mappath(path)) set fso = nothing End If End Function Function IsExists(filespec) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists(server.MapPath(filespec))) Then IsExists = True Else IsExists = False End If Set fso=nothing End Function Function IsFolder(Folder) Set fso = CreateObject("Scripting.FileSystemObject") If FSO.FolderExists(server.MapPath(Folder)) Then IsFolder = True Else IsFolder = False End If Set fso=nothing End Function %>