php从mysql读取图片路径并显示
<?Header("Content-type:image/gif");mysql_connect("localhost:/tmp/mysql/mysql.sock","r...
<?
Header( "Content-type: image/gif");
mysql_connect("localhost:/tmp/mysql/mysql.sock","root","mysql174") or die("unable to connect to SQL server");
mysql_select_db("members") or die("unable to select database");
$result=mysql_query("SELECT * FROM Images WHERE PicNum=5") or die("Cant perform Query");
$row=mysql_fetch_object($result);
echo "<IMG SRC=\"$row->Image\">";
?>
怎么显示出来图片呢,这样出来的是<IMG SRC="picture/AJ[9W]X7RO_{O$788E29IHF.jpg"> 展开
Header( "Content-type: image/gif");
mysql_connect("localhost:/tmp/mysql/mysql.sock","root","mysql174") or die("unable to connect to SQL server");
mysql_select_db("members") or die("unable to select database");
$result=mysql_query("SELECT * FROM Images WHERE PicNum=5") or die("Cant perform Query");
$row=mysql_fetch_object($result);
echo "<IMG SRC=\"$row->Image\">";
?>
怎么显示出来图片呢,这样出来的是<IMG SRC="picture/AJ[9W]X7RO_{O$788E29IHF.jpg"> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询