|
Posted by Rami Elomaa on 06/01/07 12:55
java.inet@gmail.com kirjoitti:
> hi
>
>
> what is the main application of header() function in php.........plz
> explain in clear and depth
>
>
>
>
> ........i am the newbie of ..php ...so with practical examples also
>
First you should know what http headers are. All you need to know about
php's header() is that if you want to send specific headers, other than
what the server sends by default, you use header to set them. Here's a
good page to start with: http://www.cs.tut.fi/~jkorpela/http.html
For example, here's what Google sends, when you open the index page:
HTTP/1.x 200 OK
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Server: GWS/2.1
Content-Length: 1731
Date: Fri, 01 Jun 2007 12:50:35 GMT
It's just basic info for the browser, what charset the browser should
use to display the page (utf-8), how it should render it (html), how big
file it is...
You can do plenty of useful things with headers, Google is your friend.
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Navigation:
[Reply to this message]
|