新手问题,迅速拿分
大家帮我看看这个问题
具体来说: 我在表中保存了图片的相对地址 在需要显示的时候直接查表找到所需要的图片的地址
然后把它显示出来
我的做法是:在后台中添加商品信息的时候 在图片地址信息栏中输入图片地址
然后在后台中商品信息查询中要把图片显示出来
<td width="121" rowspan="6" align="center" valign="top">图片显示<BR>
<img src="Img.asp?id=<%=rs("id")%>&action=商品信息" width="120"
height="60"></td>
其中Ima.asp的代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="include/conn.asp"-->
<!--#include file="checklogin.asp"-->
<%
action=Request.QueryString("action")
Select case action
case "友情链接"
call klink()
case "商品信息"
call goods()
End Select
'子过程
Function klink()
Set rs=Server.CreateObject("ADODB.Recordset")
id=Request.QueryString("id")
sqlstr="select Kpicture from tab_klink where id="&id&""
rs.open sqlstr,conn,1,3
klink="Fklink/"&<%=rs("Kpicture")%>"
rs.close
Set rs=Nothing
End Function
Function goods()
Set rs=Server.CreateObject("ADODB.Recordset")
id=Request.QueryString("id")
sqlstr="select Gpicture from tab_goods where id="&id&""
rs.open sqlstr,conn,1,3
goods="pictures/"&<%=rs("Gpicture")%>"
rs.close
Set rs=Nothing
End Function
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>电子商务网站----浏览图片</title>
</head>
<body>
</body>
</html>
帮看看哪出的问题? 谢谢