How can I detect HTTP method in CodeIgniter controller class?
Edited: Is there any other way than using $_SERVER[\'REQUEST_METHOD\'] in
$_SERVER[\'REQUEST_METHOD\']
In CodeIgniter 3, you can use the method uhm...method of Input Class.
From the docs:
echo $this->input->method(TRUE); // Outputs: POST echo $this->input->method(FALSE); // Outputs: post echo $this->input->method(); // Outputs: post