关于我的ASP网站注册时照片上传的问题
来源:百度知道 编辑:UC知道 时间:2024/06/01 17:19:15
<TD width="5%" height="30"></TD>
<TD width="20%" height="30" align="right" class=INDEX_XMALL>照片上传:</td><TD width="70%" height="30" class=INDEX_XMALL><iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="25" width="100%" name="upfile" src="my_up.asp"></iframe></TD>
<TD width="5%" height="30"></TD></TR>
<% If HOST_CODE=0 then %>
还有一段上传后的:
<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include file="boardconn.asp"-->
<!--#include file="inc/sql.asp"-->
<!--#include file="inc/inc.asp&qu
上传的文件你并没有展示出来 是一个包含文件 而且是否需要组件也不知道
给你一个十分好用的无组件上传例子
给你两个页面吧
第一个,上传程序页:
<%
response.buffer=true
name=request("name")
name1=request("name1")
name2=request("name2")
formsize=request.totalbytes '获取提交数据量的总字节数
formdata=request.binaryread(formsize) '保存从客户端读取到的数据
'优化读取到的二进制数据
bncrlf=chrB(13)&chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
set connGraph=server.CreateObject("ADODB.connection")
connGraph.ConnectionString="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("images.mdb")
connGraph.Open
set rec=server.createobject("ADODB.recordset")
rec.Open "SELECT * FROM images where id is null",c