asp怎么让数据库的图片显示在页面,
我做好了,但是在页面上显示,是空白我上传图片的文件fabu.asp<html><head><metahttp-equiv="Content-Type"content="t...
我做好了,但是在页面上显示,是空白
我上传图片的文件fabu.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户注册</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 14px;
text-align: left;
}
.rr {
text-align: left;
}
-->
</style>
</head>
<body>
<center>
<br>
<%
=request.QueryString("msg")
%>
<form name="form1" method="post" action="fabu_seve.asp?ac=adduser">
<table width="39%" height="105" border="0" align="left" >
<tr>
<td width="32%" height="30">菜名:</td>
<td width="68%" height="30"><input name="username" type="text" id="username">
*</td>
</tr>
<tr>
<td height="30">上传图片:</td>
<td height="30"><input name="picture" type=file accept="image/*"></td>
</tr>
<tr>
<td>价格:</td>
<td><input name="jiage" type="text" id="jiage"></td>
</tr>
<tr>
<td>名菜介绍</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
显示在页面的代码zhuye.asp
<!-- #include file="conn.asp" -->
<%
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from laoban"
rs.open sqlstr,conn,1,1
rs.movefirst
while not rs.eof
response.write(rs("tupian"))
rs.movenext
wend
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
数据库 userinfo.mdb
表 laoban
字段 tupian
测试网址www.18opp.com/1121 展开
我上传图片的文件fabu.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户注册</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 14px;
text-align: left;
}
.rr {
text-align: left;
}
-->
</style>
</head>
<body>
<center>
<br>
<%
=request.QueryString("msg")
%>
<form name="form1" method="post" action="fabu_seve.asp?ac=adduser">
<table width="39%" height="105" border="0" align="left" >
<tr>
<td width="32%" height="30">菜名:</td>
<td width="68%" height="30"><input name="username" type="text" id="username">
*</td>
</tr>
<tr>
<td height="30">上传图片:</td>
<td height="30"><input name="picture" type=file accept="image/*"></td>
</tr>
<tr>
<td>价格:</td>
<td><input name="jiage" type="text" id="jiage"></td>
</tr>
<tr>
<td>名菜介绍</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
显示在页面的代码zhuye.asp
<!-- #include file="conn.asp" -->
<%
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from laoban"
rs.open sqlstr,conn,1,1
rs.movefirst
while not rs.eof
response.write(rs("tupian"))
rs.movenext
wend
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
数据库 userinfo.mdb
表 laoban
字段 tupian
测试网址www.18opp.com/1121 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询