So I was trying to download a zipfile I previously created in PHP but my browser just echo's out a huge string with many different and weird letters.
Anyway here is my php code for downloading my php:
header("Content-type: application/zip");
header("Content-Disposition: attachment; filename='/var/www/html/1/' . $usernumber . '/download.zip'");
header("Content-length: " . filesize('/var/www/html/1/' . $usernumber . '/download.zip'));
header("Pragma: no-cache");
header("Expires: 0");
readfile('/var/www/html/1/' . $usernumber . '/download.zip');
My mission is to make the browser download the file and not to display it like its doing now.
I am pretty new to php and backend programming - please have mercy :)
Thanks