asp调用gzip压缩文件
我想实现的功能是在ASP中压缩文本文件,压缩工具是gzip.exe
我用的代码是
fcmd = server.MapPath("../../download/cmd.exe")
fml = fcmd & " /c gzip -f txt.txt"
set wshell = server.CreateObject("Wscript.shell")
wshell.run(fml)
set wshell = nothing
cmd.exe,gzip.exe,txt.txt 这三个文件在网站的同一个目录里
运行后就是生成不了txt.txt.gz文件,在服务器上可以看到cmd.exe已经被运行了。
不知道原因在哪里,请大家不吝赐教。