ASPUpload上传的实现代码(测试通过)3
发表于:2007-06-30来源:作者:点击数:
标签:
bar.asp %@EnableSessionState=False% % Response.Expires = -1 PID = Request(PID) TimeO = Request(to) Set UploadProgress = Server.CreateObject(Persits.UploadProgress) format = brCENTERb正在上传,请耐心等待.../b/CENTERbr%T%t%B3%T 速度:(%S/秒)
bar.asp
<%@EnableSessionState=False%>
<%
Response.Expires = -1
PID = Request("PID")
TimeO = Request("to")
Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
format = "<br><CENTER><b>正在上传,请耐心等待...</b></CENTER><br>%T%t%B3%T 速度:(%S/秒) 估计剩余时间:%R %r%U / %V(%P)%l%t"
bar_content = UploadProgress.FormatProgress(PID, TimeO, "#00007F", format)
If "" = bar_content Then
%>
<HTML>
<HEAD>
<TITLE>Upload Finished</TITLE>
<SCRIPT LANGUAGE="
JavaScript">
function CloseMe()
{
window.parent.close();
return true;
}
</SCRIPT>
</HEAD>
<BODY OnLoad="CloseMe()" BGCOLOR="menu">
</BODY>
</HTML>
<%
Else @# Not finished yet
%>
<HTML>
<HEAD>
<meta HTTP-EQUIV="Refresh" CONTENT="1;URL=<%
Response.Write Request.ServerVariables("URL")
Response.Write "?to=" & TimeO & "&PID=" & PID %>">
<TITLE>正在上传文件...</TITLE>
<style type="text/css">
body,td {font-family:Tahoma; font-size: 8pt }
td.spread {font-size: 6pt; line-height:6pt }
td.brick {font-size:6pt; height:12px}
</style>
</HEAD>
<BODY BGCOLOR="menu" topmargin=0>
<% = bar_content %>
</BODY>
</HTML>
<% End If %>
原文转自:http://www.ltesting.net