注册 登录
编程论坛 ASP技术论坛

我的照片为什么取不出来?在首页的多图浏览都可以取出来

a48567653 发布于 2008-03-02 20:37, 1147 次点击
True Index为图片名称,News_Title标题,News_Body内容
<%
Set rc=Server.CreateObject("ADODB.Recordset")
sql="select * from produce where ID ="& request("ID")
rc.open sql,conn,1,1
%>
<table  width="107%" border="0" align="center" cellpadding="0" cellspacing="1">
   
    <tr>
      <td width="1005" height="40" align="center" bgcolor="#CCCCCC" class="STYLE22" style="font-weight:bold; font-size:14px"><%=replace(rc("News_Title")," ","?")%>       </td>
    </tr>
     <tr>
       <td height="40" colspan="2" align="center" class="text"><img src="funitureHT/pic/<%=rc("True_Index")%>" height="180" border="0" /></td>
    </tr>
     <tr>
       <td height="30" colspan="2" align="center" class="text" style="color:#08866B; font-size:12px; line-height:160%"><%=rc("News_Body")%></td>
     </tr>     
</table>
<%
        rc.close
        set rc=nothing
%>
</td></td></table>
5 回复
#2
madpbpl2008-03-02 23:25
funitureHT/pic/<%=rc("True_Index")%>  '检查一下路径是否正确
#3
Kettyjin19832008-03-03 10:38
sql="select * from produce where ID ="& request("ID")
这句sql有没有问题啊,
#4
hangxj2008-03-03 11:29
检查图片路径
#5
a485676532008-03-03 13:52
[bc04] 谢谢各位。问题已经解决[bc09] [bc09]
看来还不能省略
sql="select * from produce where ID ="& request("ID") &" "
这样就ok了
不过以前做的用上面的方法都可以
#6
fangjchengli2008-03-03 16:07
哦,来迟了.
1