#21391 [Opn->Asn]: header page example bogus

From: Date: Fri, 03 Jan 2003 15:22:18 +0000
Subject: #21391 [Opn->Asn]: header page example bogus
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350597@lists.php.net to get a copy of this message
ID: 21391 Updated by: tularis@php.net Reported By: goba@php.net -Status: Open +Status: Assigned Bug Type: Documentation problem Operating System: n/a PHP Version: 4.3.0 -Assigned To: +Assigned To: tularis New Comment: I agree that the example is a little bit faulty, but let me explain what is ment there IMHO: You should not send any output before the header() calls, blanc lines before <?php also count as output, and thus break your script. I will change it in the docs though Previous Comments: ------------------------------------------------------------------------ [2003-01-03 08:17:14] goba@php.net The example on http://php.net/header: | <?php header ("Content-type: audio/x-pn-realaudio"); ?> | // Broken, note the blank line above Is bogus, because whitespace before and after examples is stripped off, so the example should be modified to have a different error case presented. Ie: | <html> | <?php header ("Location: http://www.example.com/"); ?> | // Broken, note the script output above I cannot do this myself now... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21391&edit=1

« previous php.doc (#969350597) next »