1、库中的图片直接输出的话,一次只能一张
2、批量输出应生成图片文件
3、输出方法:
secong.php3
...
$result=mysql_query("SELECT * FROM images id=图片的id");
if($row=mysql_fetch_object($result))) {
Header("Content-type: image/gif"); // 在没有保存原图片类型时用gif类型
echo $row->images;
}
?>page.htm
<img src="secong.php3?id=n">
2、批量输出应生成图片文件
3、输出方法:
secong.php3
...
$result=mysql_query("SELECT * FROM images id=图片的id");
if($row=mysql_fetch_object($result))) {
Header("Content-type: image/gif"); // 在没有保存原图片类型时用gif类型
echo $row->images;
}
?>page.htm
<img src="secong.php3?id=n">
我是这样做的把图片提取和显示分开:
get_image.php
<?php
MYSQL_CONNECT( ...
mysql_select_db( ....
$rs=mysql_query("select * from table where id='$id'");
$row=mysql_fetch_array($rs);
echo $row["veg_image"];
?>
show_image.php
<img src="get_image.php?id=<? echo $id; ?>" width="220" height="220" alt="" border=0>
图片显示叶不能有任何的去他的数据输出