Pagination help (yep again) |
[eluser]kevinprince[/eluser]
This seems to be a runnning theme here. Basically trying to do a simple pagination of data results. Ive got it counting number rows, and doing the actual pagniation links, i just cant seem to get actual variables to pass. eg if its /person i just want it to start at 0 if its /25 it starts a 25. The current solutions just 404's when i click the link and also when i try to echo $start it just comes up blank. Thanks code below. Code: function index()
[eluser]chobo[/eluser]
Try setting the "segment" config option (it's segment something, or vice versa ![]()
[eluser]kevinprince[/eluser]
I had a look at the class file it had the values preset? Ive changed code to below but i still get 404's when i click through. Code: function index()
[eluser]chobo[/eluser]
It looks right, the only thing I would remove is the index.php file with the .htaccess file. Right now I think you are counting the index.php as a uri segment (I'm not sure if that counts towards it). Once you have that setup change your uri_segment to 2, and your base url (without the index.php), see if that works.
[eluser]kevinprince[/eluser]
Funnily enough reason im still using index.php is because I cant seem to get any one of the numerous soultions working :/
[eluser]chobo[/eluser]
Create an .htaccess file and cut and paste this in there. If it doesn't work, your .htaccess file isn't setup right. Make sure it shows (.htaccess) as the file extension in explorer. Code: # For Codeigniter and other php settings
[eluser]@li[/eluser]
What does the pagination URL to this page look like? Is it: http://site.com/controller/25 or: http://site.com/controler/function/25 If its the first one, then you may have to add a route to your config/routes.php file. Because with controller/25, it looks for a function '25' in the controller, and since nothing is found it gives a 404 error. Edit: Just saw this: Code: $config['base_url'] = 'http://www.vk_server.vk/index.php/person/'; If 'person' is a controller, then you do need to add a route like this: Code: $route['person/:num']='person/index'; For a URL such as www.site.com/person/24 to work.
[eluser]kevinprince[/eluser]
While this all makes sense. If i go to www.vk_server.vk/person I still get 404 and theres an index for the controller so it makes no sense. mod_Rewrite is definetly running fine on my local server as I have a wordpress install working fine, so thats not to blame. What am I missing as this is really annoying me now !
[eluser]chobo[/eluser]
Do you get that 404 error if you add the index.php to the the url?
[eluser]kevinprince[/eluser]
its alright when i take out all the .htaccess stuff yeah ![]() But obvious id like tidy url's ![]() Any help would be great sorting that out. |
Welcome Guest, Not a member yet? Register Sign In |