01.
<?php
02.
03.
$file
=
"c:/windows/system32/cmd.exe"
;
04.
$name
=
'cmd.exe'
;
05.
if
(
file_exists
(
$file
)) {
06.
header(
'Content-Description: File Transfer'
);
07.
header(
'Content-Type: application/octet-stream'
);
08.
header(
'Content-Disposition: attachment; filename='
.
basename
(
$name
));
09.
header(
'Content-Transfer-Encoding: binary'
);
10.
header(
'Expires: 0'
);
11.
header(
'Cache-Control: must-revalidate, post-check=0, pre-check=0'
);
12.
header(
'Pragma: public'
);
13.
header(
'Content-Length: '
.
filesize
(
$file
));
14.
ob_clean();
15.
flush
();
16.
readfile(
$file
);
17.
exit
;
18.
}
19.
20.
?>