I'm using the following code which promts the user to download a text file which has been generated automatically:
Header("Content-type: application/octet-stream");
Header("Content-Disposition: attachment; filename=$filenamef");
echo $text_dataA;
exit();
This works fine for one file, but when I repeat the code as part of the same script, so the user would get two download prompts, only the first promt appears.
Is this normal behaviour? Any workarounds?