note 31141 added to function.header

From: Date: Fri, 11 Apr 2003 00:17:11 +0000
Subject: note 31141 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-46472@lists.php.net to get a copy of this message
I was doing this: require_once('useragent.php'); $agent = new UserAgent(); if ($agent->isPPC()) { session_write_close(); header("Location: http://www.slashdot.org/palm/"); exit; } It works, but ONLY if you ensure you leave NO spaces around the <?php ... ?> in the useragent.php file. This basically means that php will write any empty lines back, you cannot redirect if you've written back to the client. This is all cached before being sent back to the browser, I have not yet dug up how to empty the cache in php. Mark -- http://www.php.net/manual/en/function.header.php http://master.php.net/manage/user-notes.php?action=edit+31141 http://master.php.net/manage/user-notes.php?action=delete+31141 http://master.php.net/manage/user-notes.php?action=reject+31141

« previous php.notes (#46472) next »