<html>
<head>
<title>test</title>
</head>
<body>
<img src='pixel.php' />
</body>
</html>
我的php代码如下:
(pixel.php)
// send the right headers
$expiry = 0;
header('Expires: 0');
header('Cache-control: private, max-age=0');
header('Content-Type: image/gif');
header('Content-Length: ' . filesize($fileName));
// get a file pointer to the image
$fp = fopen($fileName, 'rb');
// dump the picture and stop the script
fpassthru($fp);
我需要做什么才能让safari和chrome按预期运行?