FSO操作文件系统(3)
Set FSO=Server.CreateObject("Scripting.FileSystemObject")
FileIsExists=FSO.FileExists(path&F_FileName)
If FileIsExists=True And mode<>1 Then
fso.deletefile(path&F_FileName)
Response.Write("<font color='#000080'>文件已经存在,已经被删除</b></a>;")
F_File.SaveToFile path&F_FileName
Response.Write("<a href='upfso.asp?action=fso&path="&path&"'><b><font color='#000080'>点击这里继续上传:"&path&F_FileName&"</font></b></a>")
ElseIf FileIsExists=True And mode=1 Then
Response.Write("<font color='#000080'>文件已经存在,您选择了不覆盖</font></b>")
Else
F_File.SaveToFile path&F_FileName
Response.Write("<a href='upfso.asp?action=fso&path="&path&"'><b><font color='#000080'>点击这里继续上传:"&path&F_FileName&"</font></b></a>")
End If
End IF
Set F_File=Nothing
Set FileUP=Nothing
Else
Dim path,nn,mmode
nn=Trim(request("nn"))
mmode=Trim(request("mode"))
path=Replace(request("path"),"//","/")
If path="" Then path="../newup/"
Response.Write("<form enctype=""multipart/form-data"" method=""post"" action=""upfso.asp?yes=upload&path="&path&"&nn="&nn&"&mode="&mmode&""" class=""admin_fso_up"" onsubmit=""CheckForm()"" name='form'><label>选择:<input name=""File"" type=""File"" size=""20""/></label><label> <input type=""Submit"" name=""Submit"" class=""submit"" value="" 上传 "" /></label></form>")
内容版权声明:除非注明,否则皆为本站原创文章。