header::status($code, $send = true)
Sends a status header
-
$code (int/string)
The HTTP status code or custom message -
$send (boolean)
If set to false the header will be returned instead -
return (mixed)
Example
// sends a "404 Not Found" header
header::status(404);
// returns the text for "500 Internal Server Error"
$status = header::status(500, false);
2.5.0 +
Custom headers
You can also pass your own custom headers in case you need a special one that isn't supported by the Toolkit. Be careful with made-up ones though.
header::status('999 Custom Header');