Codeigniter and $ _SERVER

What is the equivalent of $ _SERVER in codeigniter?

+7
source share
4 answers
$this->input->server() 

See User Guide: Input for more information.

+25
source

Réjôme is in place, but remember that $ _SERVER still works great.

+7
source

Use the codigniter method for input, such as $ _POST and $ _SERVER. The CodeIgniter input class has built-in functions to prevent XSS attacks. Using the input class will also make your code much more extensible if, for example, you want to build some kind of intrusion system, such as PHP IDS.

http://codeigniter.com/user_guide/libraries/input.html

http://www.phpids.org/

Three functions:

 $this->input->post() $this->input->cookie() $this->input->server() 
+3
source

I think you can use $ _SERVER in the same way as for the "Automatic configuration URL" in the "official" CodeIgniter wiki (http://codeigniter.com/wiki/Automatic_configbase_url/)

+2
source

All Articles