php如何简单实现文件或图片强制下载的方法
//下载 function downregcaseAction() { $file="upload/regcase.jpg"; if(isfile($file)) { header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename(file)); readfile(file); exit; } else { echo "文件不存在!"; exit; } }
查看更多关于php如何简单实现文件或图片强制下载的方法的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did3225