CodeIgniter Forums

Full Version: current_url(), uri_string() and $this->uri->uri_string() do not work!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
$this->load->helper('url');
current_url();
uri_string();

$this->load->library('URI');
$this->uri->uri_string();


I tried to use this functions when my url are this:

http://siah.localhost/adm/home

my results:

current_url(); => http://siah.localhost/

uri_string(); => nothing (null)

$this->uri->uri_string(); => nothing (null)

how to I get the full url?

El Forum

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

I'd suggest you try each of the uri_protocols in the config.php file. You might find setting it to QUERY_STRING or REQUEST_URI might help.

El Forum

[eluser]Unknown[/eluser]
[quote author="TheFuzzy0ne" date="1241415450"]Welcome to the CodeIgniter forums.

I'd suggest you try each of the uri_protocols in the config.php file. You might find setting it to QUERY_STRING or REQUEST_URI might help.[/quote]

$config['uri_protocol'] = "REQUEST_URI";

done.

thanks a lot!!!