[英]Overriding MIME Type in PHP
My site is requesting a remote image which is being transferred with the wrong MIME type. 我的站点正在请求使用错误的MIME类型传输的远程图像。 I was wondering how might I override it in PHP to tell it that it's an image?
我想知道如何在PHP中覆盖它以告知它是图像? I can't use header('Content-Type') because the image is being used in a HTML document.
我无法使用header('Content-Type'),因为该图像正在HTML文档中使用。
http://manga.justcarl.co.uk/N/Naruto/494/1 - one of the pages attempting to request an image... the image looks broken because it's trying to output it as html http://manga.justcarl.co.uk/N/Naruto/494/1-试图请求图像的页面之一...图像看起来很破损,因为它试图将其输出为html
I think you need to look at possibly the server configuration (or maybe a .htaccess file?) in this case. 我认为在这种情况下,您可能需要查看服务器配置(或.htaccess文件?)。 You won't be able to make a solution for this in PHP unless you can change the img src attribute.
除非您可以更改img src属性,否则您将无法在PHP中为此解决方案。
Check this direct link to the image , it says 403 forbidden for me. 检查此指向图像的直接链接 ,它对我说403禁止。 Is it different for you?
您觉得与众不同吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.