【发布时间】:2014-01-05 13:25:57
【问题描述】:
我有一个微缩图片库。单击其中一个后,将在新选项卡中打开等效的全尺寸。假设我有很多版本的图像 .jpg,.gif and .png 。如何修改我的文件以显示正确的(浏览器最想要的)文件?
我的 Firefox 偏好是:
user_pref("network.http.accept.default", "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg;q=0.8, image/gif, image/x-xbitmap, */*;q=0.1");
还有我的 .php 文件:
<?php
$source = $_GET['source'];
echo '<img src="images/watermarked/'.$source.'" alt="File not found."></img>';
?>
【问题讨论】:
标签: javascript php css firefox content-negotiation