图片有时候显示,有时候又不显示。为何???

heioih heioih 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
通过ID,从数据库里取出相应的图片文件名,产品信息。

每次的产品信息能准确获得并显示,但图片文件名虽然能获得,却不能显示(就好像跳过了img标签一样),更灵异的是:有时候能显示,有时候又不能显示。完全无规律!

但是在本地测试的时候,又一切正常,放到服务器上才出的问题。

测试网址:http://www.bdty168.cn/sh/ 产品展示



不能正常显示图片的相关代码:
<%
ProductID=cint(request("id"))
sql="select * from Product where ProductID="&ProductID
rs.open sql,conn,3,2
if not rs.eof then
if session(ProductID)="" or DateDiff("s", session(ProductID), Now)>1200 then '相差1200秒
rs("Click")=rs("Click")+1
rs("clickdate")=now
rs.update
session(ProductID)=now
end if
%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td align="center"><p><img src="pic/<%=rs("ProductPic")%>" onload="this.width=(this.width>450?450:this.width)" vspace="3" border="0" /><br />
<br />
</p> </td>
</tr>
<tr>
<td align="left">          产品名称:<%=rs("ProductNameCn")%>
          产品型号:<%=rs("ProductNameEg")%><br />
          产品说明:<%=rs("ProductInfoCn")%></td>
</tr>
<tr>
<td align="center"><a href="javascript:history.go(-1);" class="green">返回</a></td>
</tr>
</table>
<%
else
response.Write("没有资料!")
end if
rs.close
%>
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
heioih
ASP 28,401 成员 356,938 内容