I just want to redirect the page after downloading the file, i use two methods for redirect 1- javascript 2- header but nothing works for me , my code is
<?php
$packPath = $_REQUEST['packPath'];
header('Content-Description: File Transfer');
header('Cache-Control: public');
header('Content-Type: application/zip');
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: attachment; filename='. basename($packPath));
header("Content-Length: " .(string)(filesize($packPath)) );
ob_clean(); #THIS!
flush();
readfile($packPath);
// header('Location: ' . $_POST['accept']);
echo '<script type="text/javascript">
window.location.href="'.$_POST['accept'].'";
</script>'; */
exit;
?>