Home  >  Article  >  Backend Development  >  从mysql中取出图片来rel使用遇到有关问题

从mysql中取出图片来rel使用遇到有关问题

WBOY
WBOYOriginal
2016-06-13 12:53:35756browse

从mysql中取出图片来rel使用遇到问题
如果图片放本地, 如下这样使用,就没有问题.
echo "

如果把图片放mysql里, 存成mediablob的格式, 然后用一个php去读它, 就不行了.
echo "

picshow_restaurant.php中读取图片直接echo:
  $row=mysql_fetch_object($result);
  header("Content-type: image/JPEG",true); 
  echo $row->picdata;   

不知道是哪里出了问题. 请教一下大家, 谢谢了.


------解决方案--------------------
可能是我对rel不了解,连接不是用 href属性?
rel是说与目标连接的关系 ?
------解决方案--------------------
1 rel="....."  加引号
2 改用href 试试
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