CodeIgniter Forums
URI Class not functioning properly. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: URI Class not functioning properly. (/showthread.php?tid=7798)



URI Class not functioning properly. - El Forum - 04-23-2008

[eluser]doors[/eluser]
I have a page with pagination on it. For the first pagination page there is no value, so I could get something like this:

localhost/admin/account/page//c/5

I am using uri to assoc, so page will hold the value to use for my pagination and then I do some calculation to find exactly where in the url the value is located to $config['uri_segment'] for those who know what I mean.

The problem with the url above is that instead of page getting an empty value "" or false it gets the value 'c' and then five has then become an index within the array.

This should not be the case.

I have to always place the page/ at the end of the url. Can someone tell me what else could be done?


URI Class not functioning properly. - El Forum - 04-23-2008

[eluser]louis w[/eluser]
localhost/admin/account/page//c/5 is not a valid url. why can't you put 0 in there instead of nothing?


URI Class not functioning properly. - El Forum - 04-23-2008

[eluser]doors[/eluser]
[quote author="louis w" date="1208991177"]localhost/admin/account/page//c/5 is not a valid url. why can't you put 0 in there instead of nothing?[/quote]

It is valid if your using .htaccess file to remove the index.php name and Pagination does not add a value to the url when it's on the first page.


URI Class not functioning properly. - El Forum - 04-23-2008

[eluser]wiredesignz[/eluser]
MY_Pagination - Inserts pagination segment into base_url:
http://ellislab.com/forums/viewthread/65149/