Reply to Re: How do I send HTML and a file for 'Save-As' at the same time?

Your name:

Reply:


Posted by Daniel Tryba on 11/08/17 11:17

In comp.lang.php Ivan Omelchenko 608308824 <news@omelchenko.com> wrote:
>> // The file is generated and its handler is contained by $file...
>> header('Content-type: application/javascript');
>> header("Content-length: ".filesize($file));
>> header('Content-Disposition: attachment; filename="destination_name.js"');
>> readfile($file);
>>
> Hows about $file that weight more then 8Mb ?
> You can't do it with movie, for example.

Why do you think that? readfile() "Reads a file and writes it to the
output buffer." [http://nl3.php.net/readfile]. So it doesn't use any
memory in php other than:
-the buffers to read the file and write to the output buffer.
-the output buffer _if_ output buffering in php is set to on, not
something you want to do in these kind of scripts...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация