注册 登录
编程论坛 ASP技术论坛

[求助]上传文件很复杂。

发布于 2010-05-14 16:50, 470 次点击
<form method=get action=test.asp>
<input type="file" name="pic" id="pic" accept="image/gif, image/jpeg"/>
<input type=submit />
</form>

<%
dim url
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")

url = request.queryString("pic")

response.write("url --->[" &url&"]")
response.write(vbnewline)

if (fs.FileExists("C:\a.gif") =false)then
    response.write(vbnewline)
    response.write("still not yet find the file")
else
    response.write("the file is "&fs.FileExists("C:\a.gif"))
end if

if(url <>"") then
    fs.CopyFile url, ".\webpage"
    response.write("success upload file")
end if


set fo=nothing
set fs=nothing

%>

各位大大,我试着以copy file 的方式来进行uplaod

怎么还是有问题的?可以帮忙一下吗?

怎么都没有人看看一下的?


[ 本帖最后由 pnovus 于 2010-5-14 17:49 编辑 ]
3 回复
#2
hams2010-05-14 17:55
有现成的无组件上传代码,下来看看吧。
#3
gupiao1752010-05-14 17:56
   copyfile是FSO复制文件的一个方法,你用这个上传!有想法有思路,但是这是不可能完成的!

  上传需要用到ASP的一个对象ADODB.STREAM流对象,具体可以去下载一个无组件上传看看!百度一下:ASP无组件上传 就可以了!
#4
2010-05-17 10:30
多谢大家,现在在努力解决这个问题,
迟点会把自己的代码放出来。
1