樱桃泡酒的好处:网站图片调用出错,神呀,救救我吧!

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 12:15:38
<table width="161" height="188" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="187" height="22" bgcolor="#8DB937"><div align="center"><font color="#FFFFFF"><%= rs("pro_name") %></font></div></td>
</tr>
<tr>
<td height="118"><div align="center"><a href="product_view.asp?id=<%=rs("id")%>"><img src="<%= rs("pro_img") %>" width="110" height="110" border="0"></a></div></td>
</tr>
<tr>
<td><table width="94%" height="29" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="right"><a href="product_view.asp?id=<%=rs("id")%>"><img src="image/pro/product_list_more.gif" width="38" height="13" border="0"></a></div></td>
</tr>
</table></td>
</tr>
</table>

指向的是:

<table width="538" height="220" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="100%" height="37" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left"><img src="image/pro/pro_img.gif" width="200" height="40"></div></td>
</tr>
</table>
</div>
<div align="center">
<table width="96%" height="173" border="0" cellpadding="0" cellspacing="1">
<tr>
<td height="112" bgcolor="#FFFFFF"><div align="center"><img src="<%= rs("pro_img") %>"></div></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"><div align="center"></div></td>
</tr>
</table>
</div></td>
</tr>
</table>

可是?

无论点哪个图片都是到一张,如何可以点一张图片到介绍这个图片呢?

http://www.yuyesf.com/qiyev2.0/product.asp可以到这里点一下,如何改呀。

倾我所有的积分,朋友帮帮我了。

可能楼主没处理好传递过来的ID.

关键在SQL语句上

语句应该类似这样:
sql="select pro_img from 图片地址表 where id=" & clng(request("id"))

这样

ID问题,在指向的页面中没有被接收
在你的代码前加下面代码看看:

<%
dim id
id=cint(request("id"))
%>

找一下你的SQL查询语句出来,
看是不是这样的?
sql = "select pro_img 表名 where id ='"&resquest.form("id")&"'"

最好把你的product_view.asp文件原码帖出来

很可能你在数据库中查询该图片信息的时候没有提供图片的 ID 号。指向图片的 asp 文件那里,连接数据库用的 sql 语句是什么?