作者gmotwm2001 (小马怪)
看板Web_Design
标题[问题] asp 上传档案
时间Sat Sep 30 10:33:43 2017
想请问我上网找上传的方法可以上传到成功讯息,但是
我进资料夹看并没有存档,想请问是甚麽问题?
谢谢
<% '如果发生错误,先跳过
On Error Resume Next
'宣告变数
Dim mySmartUpload
Dim intCount
'建立 aspSmartUpload 物件
Set mySmartUpload = Server.CreateObject
("aspSmartUpload.SmartUpload")
'执行上传
mySmartUpload.Upload
'将档案存放到指定位置,这里的指定位置可以使用相对路径或绝对路径
intCount = mySmartUpload.Save("/Upload")
'以下使用绝对路径的写法
'intCount = mySmartUpload.Save("c:\temp\")
'显示上传成功讯息
Response.Write(intCount & " file(s) uploaded.")
%>
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.117.166.187
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Web_Design/M.1506738826.A.825.html
1F:推 Renee606: 把第一行的on error resume next 先注解掉,遇到错误才 10/01 00:12
2F:→ Renee606: 不会跳过,才知道错误码是什麽 10/01 00:12