TEST for office posting

Test for office posting

 

 

Posting Acceptor的问题?

06-28

我在Asp中使用Posting Acceptor组件来实现文件上传,发现点击提交按钮后,文件就自动上传到服务器了,如果由重名的文件也不做任何提示就覆盖掉了,如果同时传多个重名文件,就会出错,而且缺少相应的错误提示,所以能不能对上传的文件在写入服务器目录之前作一些处理,比如改名之类的?rn最好有个例程!我的原码如下rndefault.asprn<%@ Language=VBScript %>rn<%strPostUrl="http://" & Request.ServerVariables("SERVER_NAME") & "/scripts/cpshost.dll?PUBLISH?"rn strposturl=strposturl & "http://" & Request.ServerVariables("SERVER_NAME") & "/FileUp/Send2.asp"rn strTargetUrl="http://" & Request.ServerVariables("SERVER_NAME") & "/fileup/upFile"rn%>rnrn<%Response.Write strposturlrn Response.Write " "rnResponse.Write strtargeturlrn 'Response.Endrn%>rnrnrn rnrnrn rn rnrnFileName: rn要上载的文件1: rn要上载的文件2: rnrnrn rnrnrnrnrnsend2.asprn<%@ Language=VBScript %>rn<%rn set fobj=server.CreateObject("Scripting.FilesystemObject")rn if fobj.FileExists("d:\fileup\upfile\t.htm") thenrn Response.Write "T.htm exist!"rn elsern Response.Write "t.htm isn't exist"rn end ifrn For I = 1 To Request.Form("FileName").Countrn Response.Write "Uploaded File: " & Request.Form("FileName")(I) & Request.Form("FileExtention")(I) &" "rn Response.Write "Physical Path: " & Request.Form("FilePath")(I) & " "rn Response.Write "Size: " & Request.Form("FileSize")(I) & " "rn Nextrn rn Response.Write "test"rn Response.Write Request.Form("Name")rn Response.Endrn%>rnrnrn rnrnrnrn rnrnrnrnrn

狂急,posting acceptor的问题?

06-28

我在Asp中使用Posting Acceptor组件来实现文件上传,发现点击提交按钮后,文件就自动上传到服务器了,如果由重名的文件也不做任何提示就覆盖掉了,如果同时传多个重名文件,就会出错,而且缺少相应的错误提示,所以能不能对上传的文件在写入服务器目录之前作一些处理,比如改名之类的?rn最好有个例程!我的原码如下rndefault.asprn<%@ Language=VBScript %>rn<%strPostUrl="http://" & Request.ServerVariables("SERVER_NAME") & "/scripts/cpshost.dll?PUBLISH?"rn strposturl=strposturl & "http://" & Request.ServerVariables("SERVER_NAME") & "/FileUp/Send2.asp"rn strTargetUrl="http://" & Request.ServerVariables("SERVER_NAME") & "/fileup/upFile"rn%>rnrn<%Response.Write strposturlrn Response.Write " "rnResponse.Write strtargeturlrn 'Response.Endrn%>rnrnrn rnrnrn rn rnrnFileName: rn要上载的文件1: rn要上载的文件2: rnrnrn rnrnrnrnrnsend2.asprn<%@ Language=VBScript %>rn<%rn set fobj=server.CreateObject("Scripting.FilesystemObject")rn if fobj.FileExists("d:\fileup\upfile\t.htm") thenrn Response.Write "T.htm exist!"rn elsern Response.Write "t.htm isn't exist"rn end ifrn For I = 1 To Request.Form("FileName").Countrn Response.Write "Uploaded File: " & Request.Form("FileName")(I) & Request.Form("FileExtention")(I) &" "rn Response.Write "Physical Path: " & Request.Form("FilePath")(I) & " "rn Response.Write "Size: " & Request.Form("FileSize")(I) & " "rn Nextrn rn Response.Write "test"rn Response.Write Request.Form("Name")rn Response.Endrn%>rnrnrn rnrnrnrn rnrnrnrnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试