Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeIgniter - print custom values in request header

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.

like image 598
john Avatar asked Jan 06 '16 11:01

john


2 Answers

Simply use,

$this->input->request_headers();

like image 143
john Avatar answered Nov 15 '22 02:11

john


If you are sending values from form submit,

$_REQUEST will help you

or

    $this->input->post();
    $this->input->get();
like image 42
teshvenk Avatar answered Nov 15 '22 03:11

teshvenk