我去看过了,不过不行,取出来的图片无法显示

解决方案 »

  1.   

    我差不多就是抄精华区的代码的呀!
    我的表是
    CREATE TABLE images (
    picNum int NOT NULL AUTO_INCREMENT PRIMARY KEY,
    image BLOB
    );----------------showimg.php------------------------------
    <HTML>
    <BODY>
    <?
    mysql_connect("localhost","root","") 
    or die("Unable to connect to SQL server");
    @mysql_select_db("dbname") 
    or die("Unable to select database");
    $result=mysql_query("SELECT * FROM images")
    or die("Can't Perform Query");
    While($row=mysql_fetch_object($result)) {
    echo "<IMG SRC=\"SecondType.php?picNum=$row->picNum\">";
    }
    ?>
    </BODY>
    </HTML>
    ---------SecondType.php-----------------------------
    <?
    $result=mysql_query("SELECT * FROM images WHERE picNum=$picNum") 
    or die("Can't perform Query");
    $row=mysql_fetch_object($result);
    Header( "Content-type: image/gif");
    echo $row->Image;?>
      

  2.   

    我向表中插入3张图片后,只在显示图片的位置上显示3个红叉