CodeIgniter Forums
How does uri_to_array get the info from the URL? - 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: How does uri_to_array get the info from the URL? (/showthread.php?tid=53838)



How does uri_to_array get the info from the URL? - El Forum - 08-10-2012

[eluser]jhyland[/eluser]
So basically, I need to be able to pass null values through the URI...

site.com/module/class/var1/val1/var2//var3/val3/

I need that to basically be: array('var1' => 'val1','var2' => '', 'var3' => 'val3');

So the // needs to be either empty or null.

I couldnt find the .htaccess, so where does it pull the data from? I can edit the php on my own, I just cant find where it pulls it from


How does uri_to_array get the info from the URL? - El Forum - 08-11-2012

[eluser]InsiteFX[/eluser]
Look at the ./system/helpers/url_helper.php



How does uri_to_array get the info from the URL? - El Forum - 08-11-2012

[eluser]jhyland[/eluser]
Not in there, thats for making links and mailto links and anchors and whatnot..


How does uri_to_array get the info from the URL? - El Forum - 08-11-2012

[eluser]Aken[/eluser]
/system/core/URI.php


How does uri_to_array get the info from the URL? - El Forum - 08-11-2012

[eluser]jhyland[/eluser]
[quote author="Aken" date="1344728774"]/system/core/URI.php[/quote]

yeah... somewhere in there... any idea which function at least? I looked a few times and couldnt find it.

Thanks


How does uri_to_array get the info from the URL? - El Forum - 08-11-2012

[eluser]jhyland[/eluser]
Found it...
_explode_segments()