note 116621 added to function.header
| From: | nakkers1 at yahoo dot com | Date: | Thu, 29 Jan 2015 22:02:30 +0000 |
| Subject: | note 116621 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201560@lists.php.net to get a copy of this message | ||
I just want to add, becuase I see here lots of wrong formated headers.
1. All used headers have first letters uppercase, so you MUST follow this. For example:
Location, not location
Content-Type, not content-type, nor CONTENT-TYPE
2. Then there MUST be colon and space, like
good: header("Content-Type: text/plain");
wrong: header("Content-Type:text/plain");
3. Location header MUST be absolute uri with scheme, domain, port, path, etc.
good: header("Location: http://www.example.com/something.php?a=1
http://toronto-personal-injury.lawyer/slip-and-fall/");
4. Relative URIs are NOT allowed
wrong: Location: /something.php?a=1
wrong: Location: ?a=1
It will make proxy server and http clients happier.
----
Server IP: 72.52.91.14
Probable Submitter: 70.73.20.184
----
Manual Page -- http://php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/116621
Del: integrated -- https://master.php.net/note/delete/116621/integrated
Del: useless -- https://master.php.net/note/delete/116621/useless
Del: bad code -- https://master.php.net/note/delete/116621/bad+code
Del: spam -- https://master.php.net/note/delete/116621/spam
Del: non-english -- https://master.php.net/note/delete/116621/non-english
Del: in docs -- https://master.php.net/note/delete/116621/in+docs
Del: other reasons-- https://master.php.net/note/delete/116621
Reject -- https://master.php.net/note/reject/116621
Search -- https://master.php.net/manage/user-notes.php