Internet Explorer突然停止显示带有参数的图像


Internet Explorer suddenly stopped displaying images with parameters

这个问题在过去一年一直没有出现问题。从昨天开始,我们所有的产品照片都停止在所有版本的Internet Explorer中显示。我们所有的产品照片都使用脚本在JPG显示之前将水印PNG附加到JPG中。因此,与其提供这样的普通照片:

<img scr="http://www.domain.com/image.jpg">

我们的代码正确显示如下:

<img scr="http://www.domain.com/watermark.php?size=300&photo=./image.jpg">

Chrome、Safari和Firefox可以正确显示图像。Internet explorer显示未找到的图像"x"。我们需要像以前一样在Internet Explorer中正确显示图像。

我要补充的是,如果我们从url中删除参数脚本,并正常显示图像,则图像将在IE中显示。但我们需要脚本在ou 上运行

这里有一个例子,每次执行时都会执行特定的处理:

<?php 
$base_img = 'final.png'; 
$tgt_img1 = 'actual.png'; 
$tgt_img2 = 'watermark.png'; 
/* ----- Watermark Operations You wanna do ----- */
imagepng(..., $base_img, ...);
?>

<!-- Give the source the name of your generated image directly -->
<img src="<?php echo $base_img; ?>" alt="*" /><br><br> 

希望这个示例代码能有所帮助。这比在图像的源中直接传递PHP url要好