我的代码只显示一张图片!!我想遍历数据库将mysql中的图片都输出到一个网页上!!不知道怎么做!! 不能这么输出这么输出只能显示一张全部输出,要先输出成图像文件,然后在打印<img src='xx1'> <img src='xx2'> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for($i=1;$i<=$row;$i++){$getdata1=mysql_fetch_array($sql);}起码要这样吧 while($row=mysql_fetch_array($result)){....}这样可以吗?? for循环就好了,你的错误是什么?贴出来。 需要两个PHP文件,一个用来生成图片列表页面,一个用来生成单张图片,如://list.php$result=mysql_query("select logoid from table_2");//logoid为主键if(@mysql_num_rows($result)) while($row=mysql_fetch_row($result)) echo "<img src='show.php?logoid={$row[0]}'/>";//show.php$result=mysql_query("select logo from table_2 where logoid=".$_GET['logoid']);//要防注入if(@mysql_num_rows($result)){ $row=mysql_fetch_row($result); header("content-type:image/jpeg"); echo base64_decode($row[0]);} 求助,请问我这个WSDL是什么错误? php+iss6+access+windows2003的一个有趣的问题 header会有效防止重复提交数据吗? php 上传视频的问题,在线等 找个朋友学习PHP做网站 请教如何实现下拉列表框的联动? 请各位高手帮忙,谢谢!! 哪位能给提供一些关于“域名注册whois查询”方面的编程资料 我是菜鸟,谁能帮我看下?表单数据提交之后程序没任何反应 php中,如何让一个目录不能直接访问?谢谢! 邮件自动发送。。。 美企,成都,寻PHP好手,有出国机会
$getdata1=mysql_fetch_array($sql);
}
起码要这样吧
{
....}
这样可以吗??
$result=mysql_query("select logoid from table_2");//logoid为主键
if(@mysql_num_rows($result))
while($row=mysql_fetch_row($result))
echo "<img src='show.php?logoid={$row[0]}'/>";//show.php
$result=mysql_query("select logo from table_2 where logoid=".$_GET['logoid']);//要防注入
if(@mysql_num_rows($result)){
$row=mysql_fetch_row($result);
header("content-type:image/jpeg");
echo base64_decode($row[0]);
}