CodeIgniter - print custom values in request header

john picture john · Jan 6, 2016 · Viewed 11.8k times · Source

How can I print the values set in the header of a received request using CodeIgniter?

I tried print_r($_SERVER); which doesn't help me. I'm hoping there's a different way using CI.

Answer

john picture john · Mar 24, 2016

Simply use,

$this->input->request_headers();