谁能给我一个ASP实现FTP上传的原码
谁能给我一个ASP实现FTP上传的原码 问题点数:100、回复次数:12Top
1 楼DFlyingchen(弱水三千)回复于 2003-09-03 09:00:37 得分 0
http://www.aspsky.net/download/index_1.asp?classid=1Top
2 楼tigerwen01(小虎)回复于 2003-09-03 09:04:04 得分 0
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta HTTP-EQUIV="Expires" CONTENT="0">
<title>示范</title>
<style>
<!--
A:link {text-decoration: none; color: #7d95a5; font-family: 宋体}
A:visited {text-decoration: none; color: #7d95a5; font-family: 宋体}
A:active {text-decoration: none; color: #003498; font-family: 宋体}
A:hover {text-decoration: underline; color: #003498}
body,table {font-size: 9pt; font-family: 宋体}
-->
</style>
</HEAD>
<BODY bgcolor=#ffffff topmargin=0 marginheight=5 leftmargin=0 marginwidth=5>
<form name="upload" action="upload.asp" method="post" enctype="multipart/form-data">
<table align=center border=0 bordercolor=#ffdaaa width=618>
<tr bgcolor=bisque>
<td colspan=2>
<%
Set Obj = Server.CreateObject("Yousoft.UploadFile")
response.write obj.version
set Obj=nothing
%>
<h3><a href="index.html">使用详见:index.html</a></h3>
</td>
</tr>
<tbody>
<tr bgcolor=bisque>
<td colspan=2>标题:
<input maxlength=50 name="title1" size=55 value="">
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2>性别:
<input type="radio" name="sex1" value="男" checked>
男
<input type="radio" name="sex1" value="女">
女 </td>
</tr>
<tr bgcolor=bisque>
<td colspan="2"> 属于:
<select name="sel1" size="6" multiple>
<option value="文学">文学</option>
<option value="体育">体育</option>
<option value="艺术">艺术</option>
<option value="其它">其它</option>
</select>
</td>
</tr>
<tr bgcolor=bisque>
<td colspan="2"> 是否选定:
<input type="checkbox" name="select1" value="是">
</td>
</tr>
<tr bgcolor=bisque>
<td>内容: </td>
<td align=right>分类:
<select name="list1">
<option value="分类1" selected>分类1</option>
<option value="分类2">分类2</option>
<option value="分类3">分类3</option>
<option value="分类4">分类4</option>
<option value="分类5">分类5</option>
</select>
</td>
</tr>
<tr bgcolor=bisque>
<td align=middle colspan=2>
<textarea name="content1" cols="90" rows="10"></textarea>
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2> 选取文件一:
<input maxlength=100 name="file1" size=50 type=file >
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2 height="2"> 选取文件二:
<input maxlength=100 name="file2" size=50 type=file >
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2> 选取文件三:
<input maxlength=100 name="file3" size=50 type=file >
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2> 选取文件四:
<input maxlength=100 name="file4" size=50 type=file >
</td>
</tr>
<tr bgcolor=bisque>
<td colspan=2> 选取文件五: <input maxlength=100 name="file5" size=50 type=file >
</td>
</tr>
<tr bgcolor=bisque >
<td align=left colspan=2>
<input class=button name="save" type=submit value=确认上传 >
<a href="ftpweb/download/YouUpload.zip">点击下载</a>
</td>
</tr>
</tbody>
</table>
</form>
</BODY>
</HTML>
Top
3 楼lqflsh(不要让困难成为理由)回复于 2003-09-03 09:04:08 得分 10
http://www.cgknife.com/yjlrb/upfile.rarTop
4 楼tigerwen01(小虎)回复于 2003-09-03 09:04:51 得分 50
upload.asp文件:
<HTML>
<BODY>
<TITLE>文件上传</TITLE>
<CENTER>
</CENTER>
<% Set Obj = Server.CreateObject("Yousoft.UploadFile")
Response.Write "总共上传 " & obj.Count & " 个文件<br>总数据大小 " & obj.TotalBytes & " Bytes<br>共花费了时间 " & (obj.SpendTime/1000) & " 秒<br>"
response.write obj.version %>
<HR>
<table width="75%" border="1">
<tr>
<td width="20%">标题:</td>
<td width="80%"><%=obj.form("title1")%></td>
</tr>
<tr>
<td width="20%">属于:</td>
<td width="80%"><%=obj.form("sel1")%></td>
</tr>
<tr>
<td width="20%">性别:</td>
<td width="80%"><%=obj.form("sex1")%></td>
</tr>
<tr>
<td width="20%">分类:</td>
<td width="80%"><%=obj.form("list1")%></td>
</tr>
<tr>
<td width="20%">内容: </td>
<td width="80%"><%=obj.form("Content1")%></td>
</tr>
<tr>
<td width="20%">是否选定:</td>
<td width="80%"><%=obj.form("select1")%></td>
</tr>
<tr>
<td width="20%">提交按钮:</td>
<td width="80%"><%=obj.form("save")%></td>
</tr>
</table>
<p> </p>
<p>上传文件如下:<br>
</p>
<table border="1">
<tr>
<td nowrap>名称</td>
<td nowrap>文件名(包括扩展名)</td>
<td nowrap>文件名(不含扩展名)</td>
<td nowrap>文件大小(B)</td>
<td nowrap>原文件路径</td>
<td nowrap>文件扩展名</td>
<td nowrap>原文件名(含路径)</td>
</tr>
<%for i=0 to Obj.Count-1 %>
<% userFile = Obj.userFile(i) %>
<tr>
<td>
<% =userFile %>
</td>
<td>
<% =Obj.FileName(userFile) %>
</td>
<td>
<% =Obj.FileNameX(userFile) %>
</td>
<td>
<% =Obj.FileSize(userFile) %>
</td>
<td>
<% =Obj.FilePath(userFile) %>
</td>
<td>
<% =Obj.FileExt(userFile) %>
</td>
<td>
<% =Obj.OldFileName(userFile)%>
</td>
</tr>
<% ' Obj.SaveToFTP "192.168.7.168",21,5000,"xu","xu",0,"",0,"",userFile,Obj.FileName(userFile) %>
<% 'Obj.SaveFile userFile, "c:\" & Obj.FileName(userFile) %>
<%' Obj.SaveFileAS userFile, "c:\" & Obj.FileName(userFile) %>
<% 'Obj.SaveFileAS "file6", "c:\a.txt" %>
<%' =Obj.GetFileData (userFile,"txt") %>
<% next
set Obj=nothing %>
</table>
<HR>
<p align="right"><a href="http://yousoft.home.chinaren.com" target="_blank">编程任我行</a>
<a href="mailto:yousoft@chinaren.com">徐长友</a></p>
</BODY>
</HTML>
Top
5 楼inelm(木野狐)回复于 2003-09-03 09:42:00 得分 0
我想楼上的几位是否误会了楼主的意思? 楼主是要"ftp上传“。
源码我倒是有的,不过要用一个组件Top
6 楼opolmzy(ASP)( 一寸木)回复于 2003-09-03 09:55:41 得分 0
http://expert.csdn.net/Expert/topic/2216/2216708.xml?temp=.5981562Top
7 楼zjh13226(IT民工.net)回复于 2003-09-03 11:02:58 得分 0
to:inelm(ASP.NET/C#)
唯你子解,源码能发给我吗 email:zhuojinhui@163.comTop
8 楼qiao198(乔本)回复于 2003-09-29 16:49:44 得分 0
老大,网上找吗,随便googleTop
9 楼qiao198(乔本)回复于 2004-01-13 12:47:03 得分 0
我有老兄,我发邮件给你!!Top
10 楼qiao198(乔本)回复于 2004-01-13 12:47:43 得分 40
我的QQ:35467957
Mail:qiao198@sina.comTop
11 楼jfly301(海浪~~)回复于 2004-01-13 12:57:24 得分 0
可以吗?jfly301@hotmail.comTop
12 楼aspnetxp(裸奔的脚本)回复于 2004-01-13 13:07:29 得分 0
<%@ Language=VBScript%>
<script language=vbscript>
sub change_file()
a=right(document.all("file1").value,4)
for i=0 to document.all("select1").length-1
if document.all("select1").options(i).value=a then
document.all("select1").options(i).selected=true
end if
next
end sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>协议管理</title>
</head>
<body background="images/back.gif" topmargin="0" leftmargin="0">
<table border="0" width="582" align="center">
<tr>
<td width="574" height="18" colspan="2"></td>
</tr>
<tr>
<td width="36" height="22">
<p align="left"><img border="0" src="images/BD10253_.GIF"></p>
</td>
<td width="532" height="22">
<b><i><font color="#000080" size="4"><u>协议管理: _
_
</u></font></i></b>
</td>
</tr>
</table>
<form method="post" action="upload_xy.asp" enctype="multipart/form-data">
<table border="0" width="601" align="center">
<tr>
<td width="124" height="1" nowrap><b><font size="4">第一项:</font></b></td>
<td width="477" height="1" align="left" nowrap>
</td>
</tr>
</table>
<table width="601" height="228" border="0" align="center">
<tr>
<td width="148" height="1" nowrap>
</td>
<td width="453" height="1" align="left" nowrap colspan="3">
</td>
</tr>
<tr>
<td width="148" height="1" nowrap>
<p align="right"> 协议名称:
</td>
<td width="287" height="1" align="left" nowrap colspan="3">
<input name="text1" size="45" maxlength="30" ID="text1" style="height: 22; width: 292"></td>
</tr>
<tr>
<td width="148" height="10" nowrap>
<p align="right">发 布 人:
</td>
<td width="151" height="10" align="left" nowrap>
<input name="iauth" size="45" maxlength="30" style="height: 22; width: 140" readonly value="<%=session("username")%>"></td>
<td width="151" height="10" align="left" nowrap>
<p align="right">表单格式:</td>
<td width="151" height="10" align="left" nowrap>
<select size="1" name="select1">
<option value=".txt">TXT文本文档</option>
<option value=".doc">Word文 档</option>
<option value=".xls">Excel工作表</option>
<option value=".htm">HTML网 页</option>
<option value=".ppt">PPT演示文稿</option>
</select></td>
</tr>
<tr>
<td width="148" height="8" nowrap>
<b><font size="4">第二项:</font></b></td>
<td width="453" height="8" align="left" nowrap colspan="3"> </td>
</tr>
<tr>
<td width="575" height="21" nowrap colspan="4">
<p align="left"> 单击打开
<a target="_blank" href="files/down/xian.xls"> <b>
协议管理单模板</b> </a>填写后备份文件在本地磁盘<font size="2"> </font>
</td>
</tr>
<tr>
<td width="148" height="20" nowrap> <b><font size="4">第三项:</font></b></td>
<td width="453" height="20" align="left" nowrap colspan="3"> </td>
</tr>
<tr>
<td width="148" height="29" nowrap>
<p align="right"> 文件路径:</td>
<td width="453" height="29" align="left" nowrap colspan="3">
<input id="file1" name="file1" type="file" style="height: 22; width: 360" onblur=change_file() size="40"><font size="2">
</font></td>
</tr>
<tr>
<td width="148" height="1"></td>
<td width="453" height="1" align="left" colspan="3"></td>
</tr>
</table>
<center>
<input type="submit" value="提交管理单" name="upload_xm">
</center>
</form>
</body>
</html>Top




