用asp实现把文件打包成Xml文件包,带解包的ASP工(5)
for each objSubFolder in objSubFolders
pathname = DirPath & objSubFolder.name & "\"
LoadData(pathname)
next
set objFolder=nothing
set objSubFolders=nothing
set fso=nothing
end sub
'创建一个空的XML文件,为写入文件作准备
sub CreateXml(FilePath)
'程序开始执行时间
startime=timer()
dim XmlDoc,Root
Set XmlDoc = Server.CreateObject("Microsoft.XMLDOM")
XmlDoc.async = False
Set Root = XmlDoc.createProcessingInstruction("xml","version='1.0' encoding='UTF-8'")
XmlDoc.appendChild(Root)
XmlDoc.appendChild(XmlDoc.CreateElement("root"))
XmlDoc.Save(Server.MapPath(FilePath))
Set Root = Nothing
Set XmlDoc = Nothing
LoadData(ZipPathDir)
'程序结束时间
endtime=timer()
response.Write("页面执行时间:" & FormatNumber((endtime-startime),3) & "秒")
end sub
'判断文件类型是否合法
function ext(filename)
ext = true
dim temp_ext,e
temp_ext = Split(ZipFileExt,";")
for e=0 to ubound(temp_ext)
if mid(filename,InstrRev(filename,".")+1)=temp_ext(e) then ext=false
内容版权声明:除非注明,否则皆为本站原创文章。