Загрузить файл в php
$filename = 'test.txt';
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($filename));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pregma: public');
header('Content-Length: '. filesize($filename));
readfile($filename);
exit();
Homely Hamerkop