For my own website I want to have a page where you can download .rar files from. However when I download and open the file. I get a message box saying: "No archives found.".
I dont know what to do, this is my code.
$filename="inputValidatorCasd.rar";
$file="c:\\wamp\\www\\DennisWeb\\Files\\$filename";
$len = filesize($file);
ob_clean();
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type:application/octet-stream");
$header="Content-Disposition: attachment; filename=$filename;";
header($header);
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$len);
@readfile($file);
exit;