
asp代码(数据库保存的图片在首页为何不显示),求助,谢谢帮忙!
如图,不知道为什么不显示,谢谢帮忙!<%aclass="求职技巧"'定义显示文章的栏目名称newpic=true'定义是否显示最新图文sql="selectidfroma...
如图,不知道为什么不显示,谢谢帮忙!
<%
aclass="求职技巧" '定义显示文章的栏目名称
newpic=true '定义是否显示最新图文
sql="select id from article_c where c_name='"&aclass&"'"
rs.open sql,conn,1,1
tid=rs("id")
rs.close
%>
<table width="227" border="0" cellspacing="0" cellpadding="0">
<tr >
<td height="33" align="center" class="left_td1"><table width="210" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="81" height="18" align="left" class="left_td1_1"><%=aclass%></td>
<td width="129" align="right"><a href="article.asp?class=<%=tid%>">更多</a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" align="center" valign="top" class="left_td2">
<%
if newpic=true then
sql="select top 1 article.id,title,pic,about from article,article_c where article.class=article_c.id and article_c.c_name='"&aclass&"' and pic<>'' order by article.id desc"
rs.open sql,conn,1,3
if rs.recordcount>0 then
about=rs("about")
if len(about)>72 then about=left(about,70)&"..."
%>
<table width="221" border="0" cellspacing="0" cellpadding="0">
<tr class="left_list">
<td height="80"><table width="221" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" height="80" align="center" valign="middle"><a href="show_article.asp?id=<%=rs("id")%>" target="_blank"><img src="<%=rs("pic")%>" alt="" name="" width="84" height="70" border="0" class="left_pic" /></a></td>
<td width="131" height="80" align="left" class="left_pic_title"><a href="show_article.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
</table></td>
</tr>
<tr class="left_list">
<td height="80" align="left" class="left_pic_about"><a title="<%=rs("about")%>" href="show_article.asp?id=<%=rs("id")%>" target="_blank"><%=about%></a></td>
</tr>
<tr>
<td height="10" align="left"></td>
</tr>
</table> 展开
<%
aclass="求职技巧" '定义显示文章的栏目名称
newpic=true '定义是否显示最新图文
sql="select id from article_c where c_name='"&aclass&"'"
rs.open sql,conn,1,1
tid=rs("id")
rs.close
%>
<table width="227" border="0" cellspacing="0" cellpadding="0">
<tr >
<td height="33" align="center" class="left_td1"><table width="210" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="81" height="18" align="left" class="left_td1_1"><%=aclass%></td>
<td width="129" align="right"><a href="article.asp?class=<%=tid%>">更多</a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" align="center" valign="top" class="left_td2">
<%
if newpic=true then
sql="select top 1 article.id,title,pic,about from article,article_c where article.class=article_c.id and article_c.c_name='"&aclass&"' and pic<>'' order by article.id desc"
rs.open sql,conn,1,3
if rs.recordcount>0 then
about=rs("about")
if len(about)>72 then about=left(about,70)&"..."
%>
<table width="221" border="0" cellspacing="0" cellpadding="0">
<tr class="left_list">
<td height="80"><table width="221" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" height="80" align="center" valign="middle"><a href="show_article.asp?id=<%=rs("id")%>" target="_blank"><img src="<%=rs("pic")%>" alt="" name="" width="84" height="70" border="0" class="left_pic" /></a></td>
<td width="131" height="80" align="left" class="left_pic_title"><a href="show_article.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
</table></td>
</tr>
<tr class="left_list">
<td height="80" align="left" class="left_pic_about"><a title="<%=rs("about")%>" href="show_article.asp?id=<%=rs("id")%>" target="_blank"><%=about%></a></td>
</tr>
<tr>
<td height="10" align="left"></td>
</tr>
</table> 展开
展开全部
"><img src="<%=rs("pic")%>" alt="" name="" width="84" height="70" border="0" class="left_pic" /></
这个说明数据库中保存的只是图片的地址,应该是地址错误,你可以上传图片之后,看看图片目录地址是否有错
这个说明数据库中保存的只是图片的地址,应该是地址错误,你可以上传图片之后,看看图片目录地址是否有错
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询