Doc #55436 [Opn->Bgs]: Bad Examples on header()

From: Date: Wed, 17 Aug 2011 11:07:59 +0000
Subject: Doc #55436 [Opn->Bgs]: Bad Examples on header()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7023@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55436&edit=1 ID: 55436 Updated by: bjori@php.net Reported by: scotepi at gmail dot com Summary: Bad Examples on header() -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php http_response_code is linked from the seealso, and SERVER_PROTOCOL is not 101% guaranteed to be available. Previous Comments: ------------------------------------------------------------------------ [2011-08-16 22:45:07] scotepi at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.header%23Parameters --- The example for a 404 header assumes you are using http/1.0 it should be header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found") also, for the 404 example and the location example should at lest show you how to use the http_response_code maybe in a example #3 Test script: --------------- <?php header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", null, 404); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55436&edit=1

« previous php.doc.bugs (#7023) next »