Hi
I try to save data into a file that the user can select the directory where it will be save. However, I delete data with ob_end_clean(), the script saves a file but this file doesn't contain the echo that we can see below
...
ob_end_clean(); //to delete data before
ob_start();
echo(".....");
echo ...
$buf=ob_get_contents();
ob_end_clean();
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=nomFichier");
echo($buf);