在PHP中,我们可以执行类似
的操作<?php
header("Location: https://www.example.com/test.exe");
?>
下载文件。但是,URL将在下载管理器(如DAP)中可见。那么真的有办法隐藏下载URL吗?
答案 0 :(得分:0)
//This will help you
<?php
$fullpath = 'https://www.example.com/test.exe';
$filename ='test.exe';
header("Cache-Control: public, must-revalidate");
header("Content-Type: application/exe");
header("Content-Length: " .(string)(filesize($fullpath)) );
header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile($fullpath);
?>
MIME类型信息