note 116621 deleted from function.header by salathe
| From: | salathe@php.net | Date: | Fri, 06 Feb 2015 13:34:39 +0000 |
| Subject: | note 116621 deleted from function.header by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201640@lists.php.net to get a copy of this message | ||
Note Submitter: nakkers1 at yahoo dot com
----
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.