| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 384 人关注过本帖
标题:图片上传代码出错!!
只看楼主 加入收藏
dengjifu
Rank: 1
等 级:新手上路
帖 子:60
专家分:0
注 册:2007-5-16
收藏
 问题点数:0 回复次数:2 
图片上传代码出错!!
<html><title>example</title>
<body>
<!--#include FILE="upload_5xsoft.inc"-->
<%
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize>0 then
file.saveAs Server.mappath(file.FileName)
response.write "<br>上传文件:"&file.FileName&" => temp.jpg OK!"
response.write "<br>文件大小:"&file.FileSize
end if
set file=nothing
set upload=nothing
%></body>
</html>

这样就出错了!!为什么,我已有了1这个文件夹哦
<html><title>example</title>
<body>
<!--#include FILE="upload_5xsoft.inc"-->
<%
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize>0 then
file.saveAs Server.mappath(1/file.FileName)
response.write "<br>上传文件:"&file.FileName&" => temp.jpg OK!"
response.write "<br>文件大小:"&file.FileSize
end if
set file=nothing
set upload=nothing
%></body>
</html>
搜索更多相关主题的帖子: 代码 
2007-10-07 13:19
qhscqb
Rank: 1
等 级:新手上路
威 望:1
帖 子:343
专家分:0
注 册:2007-2-3
收藏
得分:0 
file.saveAs Server.mappath(1/file.FileName)
此处应为file.saveAS server.MapPath
("1/"&file.FileName)

编程快乐,快乐编程! 没有最好,只有更好!
2007-10-07 15:03
zsf2006
Rank: 1
来 自:博客园
等 级:新手上路
威 望:1
帖 子:315
专家分:0
注 册:2006-6-3
收藏
得分:0 

光临我的博客:http://
2007-10-08 15:00
快速回复:图片上传代码出错!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019014 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved