你不需要任何組件使用VBScript上傳:
File Upload using a VBScript Class - CodeProject
我用這個在所有經典ASP網站遷移到2008 RB 64位服務器,只需很少的修改即可在代碼中找到(幾乎)插槽。此外,極少數組件是64位兼容的,並且/或者導致應用程序池僅在適度使用後崩潰。
RE病毒掃描,只要你的系統具有實時保護的A/V解決方案,您都包括在內。否則,你將需要使用shell.execute打電話給你的新上傳文件中的防病毒掃描器:
'Create new instance of the vbsUpload object'
set objUpload = new vbsUpload
'Generate the full path to save the file to'
strNewFileName = Server.MapPath("/uploads") & "\" & objUpload.files.Item(0).FileName
'Save the file to disk'
objUpload.Files.Item(0).Save strNewFileName
Set objUpload = Nothing
'File is now saved, run a/v scanner on it'
Set objWShell = CreateObject("WScript.Shell")
'Run the scanner on the filename created above'
Set objCmd = objWShell.Exec("c:\myscanner\scan.exe -parameters " & strNewFileName)
'Get the stdout from the process'
strOutput = objCmd.StdOut.Readall()
Set objCmd = Nothing
Set objWShell = Nothing
在這一切設置權限爲「有趣」,至少可以說,但應該讓你開始。
我可以使用一些指導,是的。以及如何發送通知回到頁面。 – Caveatrob 2011-05-13 04:59:40
添加使用Shell.exec調用進程的示例 – 2011-05-13 09:20:19
@abatishchev編輯的目的是什麼?這不是VBScript中的註釋。 – 2011-06-29 13:55:03