Jump to content

[SOLVED] outputting download without screen output


P3t3r

Recommended Posts

Hi,

 

I have a rather large string (say 150kb), and I'm using

header('Content-Disposition: attachment; filename="pen.tex"');
die($mystring);

to make the user download it as a file.

 

The only disadvantage is that the whole text gets displayed. Is there a way to workaround this? I.e. not using die() or echo() probably? I know it's possible with readfile(), but that's not an option as the script has no write access to the file system, so it cannot generate a file.

 

thanks!

Peter

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.