note 114996 added to function.http-response-code

From: Date: Sat, 10 May 2014 14:56:02 +0000
Subject: note 114996 added to function.http-response-code
Groups: php.notes 
Request: Send a blank email to php-notes+get-199504@lists.php.net to get a copy of this message
Note that you can NOT set arbitrary response codes with this function, only those that are known to PHP (or the SAPI PHP is running on). The following codes currently work as expected (with PHP running as Apache module): 200 – 208, 226 300 – 305, 307, 308 400 – 417, 422 – 424, 426, 428 – 429, 431 500 – 508, 510 – 511 Codes 0, 100, 101, and 102 will be sent as "200 OK". Everything else will result in "500 Internal Server Error". If you want to send responses with a freestyle status line, you need to use the header() function: <?php header("HTTP/1.0 418 I'm A Teapot"); ?> ---- Server IP: 213.172.110.14 Probable Submitter: 62.178.130.14 ---- Manual Page -- http://php.net/manual/en/function.http-response-code.php Edit -- https://master.php.net/note/edit/114996 Del: integrated -- https://master.php.net/note/delete/114996/integrated Del: useless -- https://master.php.net/note/delete/114996/useless Del: bad code -- https://master.php.net/note/delete/114996/bad+code Del: spam -- https://master.php.net/note/delete/114996/spam Del: non-english -- https://master.php.net/note/delete/114996/non-english Del: in docs -- https://master.php.net/note/delete/114996/in+docs Del: other reasons-- https://master.php.net/note/delete/114996 Reject -- https://master.php.net/note/reject/114996 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199504) next »