note 81274 deleted from function.header by tularis

From: Date: Mon, 12 May 2008 10:20:53 +0000
Subject: note 81274 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-139302@lists.php.net to get a copy of this message
Note Submitter: vclayton at broadwick dot com ---- If you want to test scripts from the command line, you should know that calls to header() are silently ignored in the CLI version of PHP. They don't get displayed, and more importantly, they don't get returned by headers_list(). So if, for example, you're doing automated testing and want to check if your script is redirecting to to the right location, you can't just check headers_list() for 'Location: ...'. If you want to be able to test header output from the CLI, you'll have to do something like wrap all calls to header() in your own function that stores the entries in a global array for later verification.

« previous php.notes (#139302) next »