我正在尝试从DropBox
下载this file,我尝试使用运行PHP
脚本的同一网站上的文件使用相同的代码,但它确实有效,但现在当我添加完整的ULR
,但不是。
问题是QR-Kodite.rar
文件是在我的Windows
下载文件夹中创建的,但其大小为0
,而Chrome
表示下载已完成。
这是我的代码:
if(isset($_GET['App'])){
if(basename($_GET['App']) == $_GET['App']){
$path = 'https://dl.dropboxusercontent.com/s/pdg8bnpmbgvcsmd/QR-Kodite.rar';
$size = filesize($path);
header('Content-Type: application/octet-stream');
header('Content-Length: ' . $size);
header('Content-Disposition: attachment; filename=' . $path);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
ob_clean();
$file = @ fopen($path, 'rb');
if($file){
fpassthru($file);
$_SESSION["ITA"] = "No";
exit();
}
}
}