?? upload.asp
字號(hào):
<!--#include file="Includes/_incFunctions.asp"-->
<!--#include file="Includes/_incUpload.asp"-->
<% 'do job here
dim Name, Email
'********************************************************
'[start section to be evaluated. Remove that on deployment version]
timeThen = milliDif()
'********************************************************
'********************************************************
'make the upload
Upload
'********************************************************
response.write "Upload Done<br/>"
'Response.end
'*********************************************************
'receive the rest of fields
Name = cstr ( myRequest("Name") )
Email = cstr ( myRequest("Email") )
'*********************************************************
'the directory path where to upload the file is get from _incFunctions.asp
'response.write sPathData & GetName & "<br/>"
'response.end
'********************************************************
'save the file on the HDD
SaveFile sPathData, GetName
'********************************************************
response.write "Save Done<br>"
'response.end
errMsg = "ok"
'********************************************************
'[end section to be evaluated. Remove that on deployment version]
timeNow = milliDif()
elapsed =timeNow-timeThen
msg ="<br>Process time in ms: " & elapsed & "<br>" & elapsedpretty(elapsed)
'response.write msg
'Response.end
'********************************************************
' IIS tends to hang if you don't explicitly return SOMETHING.
' So, you should redirect to another page or simply thank them right here...
'the sURLredirect (asp redirect page name) is get from _incFunctions.asp
'FIRST WAY TO REDIRECT THE RESULTS.
'In fact is a post to sURLredirect asp page.
'Comment the fallowing line if you want the SECOND way of redirect.
response.redirect sURLredirect & "?FileName=" & GetName & "&TimeElapsed=" & msg & "&Name=" & Name & "&Email=" & Email & "&errMsg=" & errMsg
%>
<form method="post" name="frmSubmit">
<input type="hidden" name="FileName"value="">
<input type="hidden" name="Name" value="">
<input type="hidden" name="Email" value="">
<input type="hidden" name="errMsg" value="">
</form>
<script LANGUAGE="javascript">
<!--
//SECOND WAY TO REDIRECT THE RESULTS.
function frmSubmit(sAction, sFileName, sName, sEmail, errMsg)
{
document.frmSubmit.action = sAction;
document.frmSubmit.FileName.value = sFileName;
document.frmSubmit.Name.value = sName;
document.frmSubmit.Email.value = sEmail;
document.frmSubmit.errMsg.value = errMsg;
document.frmSubmit.submit();
}
//In fact is a post to sURLredirect asp page.
//Comment the fallowing line if you want the FIRST way of redirect.
frmSubmit("<%=sURLredirect%>", "<%=GetName %>", "<%=Name %>", "<%=Email%>", "<%=errMsg %>")
-->
</script>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -