- <?php
- if($_GET['id']==2)
- {
-
-
- $dir='maze.png';
- if (!file_exists($dir)) {
- echo "文件找不到";
- exit;
- } else {
- $file = fopen($dir,"r");
-
-
- Header("Content-type: application/octet-stream");
- Header("Accept-Ranges: bytes");
- Header("Accept-Length: ".filesize($dir));
- Header("Content-Disposition: attachment; filename=" . $dir);
-
-
- echo fread($file,filesize($dir));
- fclose($file);
- exit;
- }
- }
- else
- {
- echo "<mce:script type="text/JavaScript"><!--
- history.go(-1);
-
- }
- ?>
此文章由 http://www.ositren.com 收集整理 ,地址为:
http://www.ositren.com/htmls/70764.html