存档
1.下载地址
http://www.miaoqiyuan.cn/products/webzip.rar
2.程序源码
http://www.miaoqiyuan.cn/p/webzip-code
3.使用说明
http://www.miaoqiyuan.cn/p/webzip-demo
4.未解决问题
ADODB.Stream读取asp文件时,如果文件结尾为%>,则%后的>会被忽略掉,现在本人暂未解决这个问题,用户可以在以%>结尾的asp文件,请在后边添加一个空格或换行符,恢复后程序即可正常使用。
1.下载&安装
到http://www.miaoqiyuan.cn/products/webzip.rar,保存为webzip.rar以供备用。
2.压缩
将webzip.rar中的webzip.asp、webzip.asp.webzip解压到要压缩的目录。在浏览器中访问[hostname]/[保存路径]/webzip.asp打开本工具,点击压缩,稍等片刻,即可打包完毕。
3.上传
将webzip.asp、webzip.asp.webzip通过FTP或在线文件管理系统上传到您的站点目录。
4.解压
在浏览器中访问[hostname]/[保存路径]/webzip.asp,选择解压。稍等片刻,您的整个站点将会在服务服务器上解压完毕。
至此,您的整个站点即可正常使用了。
[Debug]
1.ADODB.Stream读取asp文件时,如果文件结尾为%>,则%后的>会被忽略掉,现在本人暂未解决这个问题,用户可以在以%>结尾的asp文件,请在后边添加一个空格或换行符,恢复后程序即可正常使用。
2.如果您在使用中发现出现某些问题,可直接致邮:mqycn@126.com
猫七原创ASP压缩解压系统-WEBZip,原理即遍历当前目录的所有文件和文件夹,将结果保存到MDB数据库中。现在已经实现了ASP无需任何插件,仅用Access数据库。
全部代码如下:
<%
Server.ScriptTimeout=9999
Response.Buffer=false
Dim WEBZip_Path,WEBZip_Date,WEBZip_CMD,WEBZip_File
Dim WEBZip_FSO,WebZip_Conn,WEBZip_Rs,WEBZip_ADOStrem
‘压缩相关
‘================================================================
Function findFiles(p)
savePath(p)
for each s in p.subfolders
findFiles(s)
next
for each f in p.files
saveFile(f)
next
End Function
Function savePath(p)
If trim(replace(p,WEBZip_Path,""))="" Then Exit Function
RunSqlOne("insert into [p]([p_na],[p_pa],[p_cn])values(‘"&p.name&"’,'"&replace(p,WEBZip_Path,"")&"’,"&p.subfolders.count&")")
echo "找到路径:"&p
End Function
Function saveFile(f)
If instr(f,WEBZip_File)>0 Then Exit Function
RunSqlOne("insert into [f]([f_na],[f_pa],[f_sz])values(‘"&f.name&"’,'"&replace(f,WEBZip_Path,"")&"’,"&f.size&")")
SaveFileContent(replace(f,WEBZip_Path,""))
echo "压缩文件:"&f
End Function
‘写入文件内容
Function SaveFileContent(f)
fl=WEBZip_FSO.getfile(Server.Mappath(f))
WEBZip_Rs.Open "select * from [f] where [f_pa]=’"&f&"’",WEBZip_Conn,3,2
With WEBZip_ADOStrem
.Type = 1
.Open
.LoadFromFile fl
WEBZip_Rs("f_co") = .Read
.Close
End [...]