PHP-Code:
$filename = "../backup/backup.sql";
$fp = fopen($filename,"w");
fwrite ($fp,$export);
fclose($fp);
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/force-download");
header("Content-Disposition: attachment, filename=".$filename."");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$len);
readfile($file);
Kommentar