-1
我在我的控制器(我用的Symfony2)生成图像,当我跟我的形象回到我的回应,我得到这个:显示图像
HTTP/1.0 200 OK
Cache-Control: no-cache
Content-Disposition: inline; filename=""
Content-Type: image/jpeg
我需要显示在图像我的观点,但如果我把:
<img src="<?= $response ?>" />
浏览器显示404错误,如果我用
<?php echo $response; ?>
我只得到
HTTP/1.0 200 OK
Cache-Control: no-cache
Content-Disposition: inline; filename="example.jpg"
Content-Type: image/jpeg
Date: Wed, 08 Oct 2014 14:55:24 GMT
X-Sendfile: 67902
我想显示图像,任何想法?
谢谢!
' 2014-10-08 15:17:27
谢谢Marc,但是我怎样才能将这个射线二进制数据转换为数据 - uri? – user3396420 2014-10-08 15:21:32
http://en.wikipedia.org/wiki/Data_URI_scheme#Format – 2014-10-08 16:25:42