0
我有一個圖像縮略圖庫。點擊其中一個後,全尺寸的等價物會在新標籤中打開。假設我有很多版本的圖像.jpg,.gif and .png
。如何修改我的文件,以便顯示正確的(最常用的瀏覽器)文件?內容協商 - 在Firefox中顯示圖像
我的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>';
?>