首頁 >後端開發 >php教程 > 显示数据库中blob类型的图片,小弟我图片显示不出来

显示数据库中blob类型的图片,小弟我图片显示不出来

WBOY
WBOY原創
2016-06-13 12:44:002163瀏覽

显示数据库中blob类型的图片,我图片显示不出来
showimage.php

<?php  <br />
include_once dirname(dirname (dirname ( __FILE__ ))). '/yeqztsys1.0/utilityfunction/SqlHelp.class.php';<br />
include_once dirname(dirname (dirname ( __FILE__ ))). '/yeqztsys1.0/Comm.class.php';<br />
<br />
$SqlHelper = new SqlHelp ( 'read', 'qztoa' );<br />
$sql = "select * from qzt_image";<br />
$query = $SqlHelper->query($sql );<br />
$query_num = $SqlHelper->num_rows ($query );<br />
<br />
$rows = array ();  <br />
$retarr = array (); <br />
$query =$SqlHelper->query ( $sql );<br />
if($query)<br />
{<br />
$arr_teainfo2 = array ();<br />
while ( $arr_teainfo = $SqlHelper->fetch_assoc($query) ) {<br />
$arr_teainfo2 [] = $arr_teainfo;<br />
$Id=$arr_teainfo["Id"];<br />
echo $arr_teainfo["Id"];<br />
echo "<IMG SRC=\"Second.php3?Id=$Id\">"; <br />
<br />
}<br />
}<br />
<br />
<br />
<br />
?>  <br />


Second.php3
<?php  <br />
include_once dirname(dirname (dirname ( __FILE__ ))). '/yeqztsys1.0/utilityfunction/SqlHelp.class.php';<br />
include_once dirname(dirname (dirname ( __FILE__ ))). '/yeqztsys1.0/Comm.class.php';<br />
<br />
$SqlHelper = new SqlHelp ( 'read', 'qztoa' );<br />
$sql = "select * from qzt_image where Id=10";<br />
$query = $SqlHelper->query($sql );<br />
$query_num = $SqlHelper->num_rows ($query );<br />
<br />
$rows = array ();  <br />
$retarr = array (); <br />
$query =$SqlHelper->query ( $sql );<br />
if($query)<br />
{<br />
$arr_teainfo2 = array ();<br />
while ( $arr_teainfo = $SqlHelper->fetch_assoc($query) ) {<br />
$arr_teainfo2 [] = $arr_teainfo;<br />
$Id=$arr_teainfo["Id"];<br />
$imagetype=$arr_teainfo["imagetype"];<br />
//echo $arr_teainfo["images"];<br />
//Header( "Content-type: $imagetype"); <br />
header('Content-type: $imagetype');<br />
echo $arr_teainfo["images"];<br />
<br />
}<br />
}<br />
<br />
?>   <br />


请问我哪里有问题?PHP新人,不知道哪里错了

PHP
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn