Home  >  Article  >  Backend Development  >  显示数据库中blob类型的图片,小弟我图片显示不出来

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

WBOY
WBOYOriginal
2016-06-13 12:44:002143browse

显示数据库中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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn