<?php
header('Content-Type: application/octet-stream');
$filesize = filesize('s.png'); //获得文件大小
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Content-Transfer-Encoding: binary');
header('Content-Encoding: none');
header('Content-type: application/force-download');
header('Content-length: '.$filesize);
header('Content-Disposition: attachment; filename="s.png"');
readfile('s.png');
?>