$file = 'kdb.class.php';
$imageFileType = strtolower(pathinfo($file,PATHINFO_EXTENSION));
if($imageFileType != "php") {
die("Premission Denied");
}
if (basename($file)!='kdb.class.php'){
die("Premission Denied");
}
if(!file_exists($file)){ // file does not exist
die('未找到文件,可能已被删除或移动
File not found
请提供管理员以下信息
'.$file.'
故障申报');
} else {
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$file");
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: binary");
// read the file from disk
readfile($file);
}
?>