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)


// sends a "404 Not Found" header

// 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');

Is something missing or incorrect? Edit this page on Github…