网站首页  |  业界新闻  |  技术文章  |  视频教程  |  下载频道  |  程序源码  |  个人空间  |  编程论坛
 
学习型 ASP/PHP/ASP.NET 主机 30元/年 全能 ASP/PHP/ASP.NET 主机,支持月付 专业 MSSQL 数据库空间,支持月付 专业 MySQL 数据库空间,支持月付
发新话题
打印

【求助】化境无组件上传问题 ---(已解决了,答案在八楼)

【求助】化境无组件上传问题 ---(已解决了,答案在八楼)

我用了 化境无组件上传  
上传后图片放在C:\Inetpub\wwwroot

怎么改路径。我看了很久都不会改~~

会的朋友帮下小弟,谢谢了。
在线等呢。~~~-

[ 本帖最后由 zhuzhanjun 于 2008-5-9 16:03 编辑 ]

TOP

怎么没有人回答我的问题哦

TOP

Save里可以设置保存文件地址呀
考完啦~

TOP

Public function SaveAs(FullPath)
    dim dr,ErrorChar,i
    SaveAs=true
    if trim(fullpath)="" or FileStart=0 or FileName="" or right(fullpath,1)="/" then exit function
    set dr=CreateObject("Adodb.Stream")
    dr.Mode=3
    dr.Type=1
    dr.Open
    Data_5xsoft.position=FileStart
    Data_5xsoft.copyto dr,FileSize
    dr.SaveToFile FullPath,2
    dr.Close
    set dr=nothing
    SaveAs=false
  end function

是改以上的代码吗?如果是,应该怎么改呢。版主大哥

TOP

<%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xsoft ''建立上传对象

response.write upload.Version&"<br><br>"  ''显示上传类的版本

if upload.form("filepath")="" then   ''得到上传目录
HtmEnd "请输入要上传至的目录!"
set upload=nothing
response.end
else
formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
end if

iCount=0
for each formName in upload.objForm ''列出所有form数据
response.write formName&"="&upload.form(formName)&"<br>"
next

response.write "<br>"
for each formName in upload.objFile ''列出所有上传了的文件
set file=upload.file(formName)  ''生成一个文件对象
if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
  file.SaveAs Server.mappath(formPath&file.FileName)   ''保存文件
  response.write file.FilePath&file.FileName&" ("&file.FileSize&") => "&formPath&File.FileName&" 成功!<br>"
  iCount=iCount+1
end if
set file=nothing
next

set upload=nothing  ''删除此对象
Htmend iCount&" 个文件上传结束!"

sub HtmEnd(Msg)
set upload=nothing
response.write "<br>"&Msg&" [<a href=""javascript:history.back();"">返回</a>]</body></html>"
response.end
end sub
%>

代码如上。怎么改呢

TOP

啊?没人回答呀

TOP

file.SaveAs Server.mappath(formPath&file.FileName)
这句就是说明文件保存的路径了。

TOP

我要的是修改保存图片路径的地方,谢谢楼上的兄弟。

问题我已经解决了


[ 本帖最后由 zhuzhanjun 于 2008-5-9 15:49 编辑 ]
附件: 您所在的用户组无法下载或查看附件

TOP

发新话题