note 53347 deleted from function.header by betz

From: Date: Sat, 04 Jun 2005 11:08:26 +0000
Subject: note 53347 deleted from function.header by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89900@lists.php.net to get a copy of this message
Note Submitter: jim dot ross at ebc-tefl-course dot com ---- After a slightly frustrating hour trying to get header to work I determined the following (as I am a novice [idiot:-)]) OK. I had a php file with a header("location ...") in it and was geting the usual "headers already sent" warning. Every piece of documentation I looked at just said to get rid of blank/white space in front of the <?php and ?> delimiters. My php file was based on a previous one I copied in and I knew that there was absoulutely no white/blank space between the <html><body> and the <?php directives. Thereby was my problem. Get rid of the <html><body> and </body></html> and any other html directives you have in the php file and it'll work fine. The ONLY thing I found that works is if the php file starts with <?php and ends with ?>. A php page that uses the "header" function CANNOT have the php directives embedded within an html wrapper.

« previous php.notes (#89900) next »