CI_Output::get_header()

get_header($header)

Parameters:
  • $header (string) – HTTP header name
Returns:

HTTP response header or NULL if not found

Return type:

mixed

Returns the requested HTTP header value, or NULL if the requested header is not set. Example:

$this->output->set_content_type('text/plain', 'UTF-8');
echo $this->output->get_header('content-type');
// Outputs: text/plain; charset=utf-8

Note

The header name is compared in a case-insensitive manner.

Note

Raw headers sent via PHP’s native header() function are also detected.

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

Please login to continue.