note 105007 deleted from reserved.variables.httpresponseheader by danbrown

From: Date: Fri, 22 Jul 2011 15:46:00 +0000
Subject: note 105007 deleted from reserved.variables.httpresponseheader by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-181788@lists.php.net to get a copy of this message
Note Submitter: leon dot spencer at alumni dot purdue dot edu ---- The $http_response_header variable is a global variable and must be declared 'global' when trying to access within a function e.g. function my_function() { global $http_response_header; //TODO: Your code here. } //end function my_function() Or you can pass it as a parameter to your function as described in post #98293 by imchillindave at hotmail dot com 07-Jun-2010 07:05. Both approaches are reasonable with the latter being explicit and more intuitive when someone is reviewing your code. IMHO

« previous php.notes (#181788) next »