CodeIgniter Forums
current_url(), uri_string() and $this->uri->uri_string() do not work! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: current_url(), uri_string() and $this->uri->uri_string() do not work! (/showthread.php?tid=18348)



current_url(), uri_string() and $this->uri->uri_string() do not work! - El Forum - 05-03-2009

[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?


current_url(), uri_string() and $this->uri->uri_string() do not work! - El Forum - 05-03-2009

[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.


current_url(), uri_string() and $this->uri->uri_string() do not work! - El Forum - 05-04-2009

[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!!!