header ( "Cache-Control: max-age=0" );
header ( "Content-Description: File Transfer" );
header ( 'Content-disposition: attachment; filename='.basename($new_file));
header ( "Content-Type: application/png" );
header ( "Content-Transfer-Encoding: binary" );
header ( 'Content-Length: ' . filesize ( $new_file ) );
@readfile ( $new_file );
二、封装成方法
function down_file($url,$type='application/zip'){
header("Cache-Control: public");
header("Content-Description: File Transfer");
header('Content-disposition: attachment; filename='.basename($url));
header(