Asp classic 在经典asp中解压缩文件
我正在尝试使用解压/压缩类。上传后我需要解压一个zip文件。我修改了“sleep”函数以检查“controller”函数/intSeconds值,并添加了“controller”函数以检查目标文件夹上的文件计数。您可以在下面看到一个代码部分 使用此函数已成功解压缩zip文件,但页面进程从未结束。使用此功能后,我需要重新启动iis 原始代码:Asp classic 在经典asp中解压缩文件,asp-classic,vbscript,unzip,fso,Asp Classic,Vbscript,Unzip,Fso,我正在尝试使用解压/压缩类。上传后我需要解压一个zip文件。我修改了“sleep”函数以检查“controller”函数/intSeconds值,并添加了“controller”函数以检查目标文件夹上的文件计数。您可以在下面看到一个代码部分 使用此函数已成功解压缩zip文件,但页面进程从未结束。使用此功能后,我需要重新启动iis 原始代码: =Now() 如果dteEnd=Now(),则 如果控制器(路径,filescontmust)=true,则 退出do 其他的 睡眠时间、路径、文件计数必须
=Now()
如果dteEnd=Now(),则
如果控制器(路径,filescontmust)=true,则
退出do
其他的
睡眠时间、路径、文件计数必须
如果结束
如果结束
环
端接头
Set objShell=Nothing
设置objFso=Nothing
%>这条线就是问题所在
if dteEnd=Now() then
只有当dteEnd与Now()完全相同(毫秒)时,它才能进入控制器部分并朝着出口do前进,否则它将进入递归循环(返回到sleep函数)
请尝试以下方法:
do While dteEnd>=Now()
if dteEnd>=Now() then
if controller(path,filesCountMust)=true then
exit do
else
Sleep intSeconds,path,filesCountMust
end if
end if
loop
我还没有尝试过,但考虑到我在同一个搜索结果中发现了这个堆栈溢出问题和github解决方案。我想这可能是解决你问题的好办法
您能够在调试器中单步执行代码吗?只有当
controller
始终返回false(即始终调用递归)时,您报告的无限执行才可能
do While dteEnd>=Now()
if dteEnd>=Now() then
if controller(path,filesCountMust)=true then
exit do
else
Sleep intSeconds,path,filesCountMust
end if
end if
loop