note 32939 added to function.header

From: Date: Wed, 11 Jun 2003 12:02:10 +0000
Subject: note 32939 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-50171@lists.php.net to get a copy of this message
I'm adressing the "content management" and META problems (headers already sent). As you know, alot of people want to do eg. meta refresh, from within a included page. This is not possible, and they get error "headers already sent". As stated above, you need to have it FIRST, eg. above the <html>. so what about making a: <?php if (isset($header)) { header("" . $header . ""); } ?> in the index file, above the <html>, etc. then in the included file, you do: $header = "whatever"; ps. please correct me if this is not possible ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32939 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32939&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32939&report=yes

« previous php.notes (#50171) next »