note 92620 added to function.header
| From: | Anonymous at osu1 dot php dot net | Date: | Fri, 31 Jul 2009 15:02:40 +0000 |
| Subject: | note 92620 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158967@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 or 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, port and so on.
good: header("Location: http://www.example.com/something.php?a=1");
4. It cann't be relative:
wrong: Location: /something.php?a=1
wrong: Location: ?a=1
It will make proxy server and http clients happier.
----
Server IP: 82.177.164.100
Probable Submitter: 195.150.132.94
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/92620
Del: integrated -- https://master.php.net/note/delete/92620/integrated
Del: useless -- https://master.php.net/note/delete/92620/useless
Del: bad code -- https://master.php.net/note/delete/92620/bad+code
Del: spam -- https://master.php.net/note/delete/92620/spam
Del: non-english -- https://master.php.net/note/delete/92620/non-english
Del: in docs -- https://master.php.net/note/delete/92620/in+docs
Del: other reasons-- https://master.php.net/note/delete/92620
Reject -- https://master.php.net/note/reject/92620
Search -- https://master.php.net/manage/user-notes.php