CI_Output::set_status_header()

set_status_header([$code = 200[, $text = '']])

Parameters:
  • $code (int) – HTTP status code
  • $text (string) – Optional message
Returns:

CI_Output instance (method chaining)

Return type:

CI_Output

Permits you to manually set a server status header. Example:

$this->output->set_status_header(401);
// Sets the header as:  Unauthorized

See here for a full list of headers.

Note

This method is an alias for Common function set_status_header().

doc_CodeIgniter
2016-10-15 16:31:49
Comments
Leave a Comment

Please login to continue.