首页 > 后端开发 > php教程 > 显示数据库中blob类型的图片,小弟我图片显示不出来

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

WBOY
发布: 2016-06-13 12:44:00
原创
2176 人浏览过

显示数据库中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
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板