【发布时间】:2014-06-23 20:20:10
【问题描述】:
找到这个:
http://stackoverflow.com/questions/7198124/setting-the-header-to-be-content-image-in-cakephp
但要么不理解,要么不适合我。
基本上想记录电子邮件的“打开”。目前它“有效”,但在 gmail 中它显示没有显示图像 - 所以我想返回一个实际的图像标题。我试过这样做:
$this->layout=false;
$this->response->type('jpg');
在用于打开的控制器中,但这不起作用。
Web Sniffer (http://web-sniffer.net/),正在显示 jpeg 响应,但仍有空白的未找到文件图像。我该如何解决?
[编辑]
这样想:
http://stackoverflow.com/questions/900207/return-a-php-page-as-an-image
还有这个:
http://book.cakephp.org/2.0/en/controllers/request-response.html
可能是解决办法
【问题讨论】:
标签: cakephp http-headers mime-types