PHP 图片
就以下载如下图片为例吧
ob_start();
readfile("http://images.wine9.com/goodsgallery/91/9187/60_90.jpg");
$img = ob_get_contents();
ob_end_clean();
header("content-type: image/jpg");
echo $img;
回复讨论(解决方案)
1、header("Content-type: image/jpeg");
2、去掉 BOM 头
1、header("Content-type: image/jpeg");
2、去掉 BOM 头
还是不能够正常的显示:(
那就是你的问题了
<?php ob_start(); readfile("http://images.wine9.com/goodsGallery/91/9187/60_90.jpg"); $img = ob_get_contents(); ob_end_clean(); header("Content-type: image/jpeg"); echo $img;那就是你的问题了
<?php ob_start(); readfile("http://images.wine9.com/goodsGallery/91/9187/60_90.jpg"); $img = ob_get_contents(); ob_end_clean(); header("Content-type: image/jpeg"); echo $img;http://images.wine9.com/images/201110/source_img/3116_P_1319076528562.jpg若是访问这张图片就是可以的了
文件编码UTF-8 BOM保存
文件编码UTF-8 BOM保存
试过了还是不可以:(
文件编码UTF-8 BOM保存
试过了还是不可以:(
在ob_start()下面加一句ob_clean()就好了
文件编码UTF-8 BOM保存
在ob_start()下面加一句ob_clean()就好了











