September 2001
Intermediate to advanced
768 pages
32h 45m
English
void header(string header, [bool overwrite])
| header | Header string to send |
| overwrite | Overwrite previous headers |
Sends an HTTP header to a client.
Returns:
Void
Description:
Sets one or more HTTP header fields forming part of the server response sent when the page is delivered to the client by the server. As with setcookie(), the header() function must be called before any other output is sent to the browser, although other PHP code can be used prior to sending the header. This is a useful function when you want the client to interpret the data sent from the server in a way that’s different from the default action. For example, most servers by default send a Content-type header of text/html. Using the header() function, you can tell ...
Read now
Unlock full access