欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php 強(qiáng)制下載文件實現(xiàn)代碼

 更新時間:2013年10月28日 08:43:22   作者:  
php 強(qiáng)制下載文件實現(xiàn)代碼。需要的朋友可以過來參考下,希望對大家有所幫助
復(fù)制代碼 代碼如下:

<?php
$file = 'monkey.gif';

if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
    exit;
}
?>
?
<?php
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=ins.jpg"); 
readfile("imgs/test_Zoom.jpg");
?>

相關(guān)文章

最新評論