header("Content-type: image/png"); makes script run twice?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: header("Content-type: image/png"); makes script run twice?
(06-23-2011 11:17 AM)Pirata Nervo Wrote:  
(06-23-2011 10:07 AM)ZiNgA BuRgA Wrote:  
(06-22-2011 08:53 PM)Pirata Nervo Wrote:  The script outputs the file once (not in multiple parts so it's limited to PHP's max post size). I'm not sure what you mean by early termination, once the file is sent to the user, the script has done its job.
But when it hasn't sent the file to the user?
Like if the user hits cancel? It's still considered as downloaded.
That'll depend on whether your script has the chance to execute the query which considers it as downloaded.
Unless you're using

PHP Code:
ignore_user_abort(true);

somewhere, your script can be terminated early.


My Blog
06-23-2011 04:57 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: header("Content-type: image/png"); makes script run twice? - ZiNgA BuRgA - 06-23-2011 04:57 PM

 Standard Tools
Forum Jump: