日期:2014-05-17 浏览次数:20377 次
<php $usrinfo = "aaa.jpg"; $Picfactory = "E://emenu/LoveBar/EMenuManager/EMenuManager/bin/Debug/Files/"; $path = iconv("gb2312","UTF-8",$Picfactory.$usrinfo); // $usrinfo = "cafe.jpg"; //检查图片是否存在 if(!file_exists($path)) exit; // header("Content-Transfer-Encoding:binary"); //文件名称 $pathinfo=pathinfo($usrinfo); Header('Content-Type:image/'.$pathinfo['extension']); Header( "Accept-Length:".filesize($path)); Header( "Content-Disposition:attachment;filename=". $pathinfo['basename']); echo readfile($path); exit; ?>