2
I am using this code to download with php, small files works, now big as 1Gb end up getting corrupted.
$arquivo = $_GET['nome']; //nome do Arquivo
$local = $_GET['dir']; //pasta onde está o arquivo
header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: '.filesize($local.$arquivo));
header('Content-Disposition: filename='.$arquivo);
header("Content-Disposition: attachment; filename=".basename($local.$arquivo));
//envia o download
readfile($local.$arquivo);
<a href="download?nome=arquivo.ext&dir=pasta/">Download</a>
Your server is apache?
– Andrei Coelho
yes, php 7 .....
– João Victor