请教怎样整合这两个代码?
各位大虾,请教这两个代码该怎么整合,是关于无组件上传的:我想获得这样的最终结果:保存到默认位置,使用原文件名,完成后提示成功!代码如下:<%@language="Javascript" codepage="936"%><html><head><%
var arrInfo = new Array;
if(Request.ServerVariables("Request_Method").Item == "POST")
{
var Upload = GetObject("Script:" + Server.MapPath("FyUpload.sct"));
Upload.ReadForm(200 * 1024);
/* 指定file_01的保存位置为C:\,文件名为上传前的文件名 */
Upload.Field.file_01.SavePath = "C:\\" + Upload.Field.file_01.SourceName;
Upload.SaveFile(); // 未指定保存位置的使用默认保存路径。
for(var i in Upload.Field)
{
if(Upload.Field[i].Message) arrInfo.push(Upload.Field[i].Message);
}
Upload.Dispose();
}
%><%If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Set Upload = GetObject("script:" & Server.MapPath("FyUpload.sct"))
Upload.ReadForm
Upload.SaveFile(保存到默认路径)
If Upload.Field.upfile.Message = "" Then
Response.Write "上传成功!"
Else
Response.Write Upload.Field.upfile.Message
End If
Upload.Dispose
Set Upload = Nothing
End If%>在线等,谢谢各位了!