Re: More on "JS alert that links to file"

From: Date: Mon, 27 Jul 2009 14:34:57 +0000
Subject: Re: More on "JS alert that links to file"
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-295874@lists.php.net to get a copy of this message
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.

« previous php.general (#295874) next »