Re: More on "JS alert that links to file"
| From: | Jim Lucas | Date: | Mon, 27 Jul 2009 14:43:14 +0000 |
| Subject: | Re: More on "JS alert that links to file" | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295880@lists.php.net to get a copy of this message | ||
Ashley Sheridan wrote:
> On Mon, 2009-07-27 at 07:34 -0700, Jim Lucas wrote:
>> tony mount wrote:
>>> I have a question that follows on from this discussion. I have a loop
>>> which creates a number of files. It first write each file to a server
>>> location then sets up the headers and asks the "Save As" question. This
>>> works OK once, but after the first download it exits without any errors
>>> or messages. If I remove the header() lines (ie just create the files on
>>> the server) no worries, it creates them all. (I start op buffer at the
>>> top of the code and flush the buffer on each loop). Anyone have any
>>> ideas please?
>>> Thanks
>>> Tony
>>>
>>>
>> Tony,
>>
>> Ashley's answer is correct. But the one thing she didn't is that what
>> you are doing is NOT possible.
>>
>> You can only send your set of header()s once, then all content that
>> follows until an exit, die, or end of script happens.
>>
>>
>>
> For the record, I'm still a he ;)
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
opps, my apologies!