pagination didn't work - 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: pagination didn't work (/showthread.php?tid=24319) |
pagination didn't work - El Forum - 11-05-2009 [eluser]marjune[/eluser] my controller Code: function index(){ then when i click the second page the url is http://mysite.com/ci/index.php/furoms/&per_page=5 then 404 Page Not Found The page you requested was not found. pagination didn't work - El Forum - 11-05-2009 [eluser]1mr3yn[/eluser] Code: function furoms($offset=''){ pagination didn't work - El Forum - 11-05-2009 [eluser]khagendra[/eluser] According to ur $config['base_url'], Code: $config['base_url'] = base_url().'furoms/'; The uri_segment should be 2, like Code: $config['base_url'] = base_url().'furoms/'; once try this, it should work. pagination didn't work - El Forum - 11-05-2009 [eluser]marjune[/eluser] well my problem is the pagination, since the total rows is 9 then the per page is 5 the pagination look like this { display 5 records here } 1 2 > when i click the 2nd page which the four remaining records will display the URL look like this http://mysite.com/ci/index.php/furoms/&per_page=5 then it will display 404 Page Not Found The page you requested was not found. pagination didn't work - El Forum - 11-05-2009 [eluser]khagendra[/eluser] Why u are not using the .htaccess file to avoid index.php in the uri string. To know how use it, please go through this link http://ellislab.com/forums/viewthread/133024/#656543 After using .htaccess file u can write ur uri string will be like this. Code: http://mysite.com/ci/furoms/5 if u r using the .htaccess file. the uri_string will be 3. Note: if u dont want to use .htaccess file now, then use uri string 4. Code: $config['uri_segment'] = 4; pagination didn't work - El Forum - 11-05-2009 [eluser]1mr3yn[/eluser] Quote:.htaccess doesn't make any sense in his problem. Try this one.. Code: function forum($offset='') { Have you tried to read the URI Routing in user guide page? pagination didn't work - El Forum - 11-06-2009 [eluser]marjune[/eluser] well, my url now look like this http://mysite.com/ci/index.php/furoms/5 after some changes in the pagination but still 404 Page Not Found The page you requested was not found. pagination didn't work - El Forum - 11-06-2009 [eluser]saidai jagan[/eluser] $config['base_url'] = base_url().'furoms/'; to $config['base_url'] = base_url().'furoms/index/'; pagination didn't work - El Forum - 11-06-2009 [eluser]Zeeshan Rasool[/eluser] [quote author="saidai jagan" date="1257532063"]$config['base_url'] = base_url().'furoms/'; to $config['base_url'] = base_url().'furoms/index/'; [/quote] Yeah, it can work i think. because we should keep in mind the url segment position pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] $config[‘base_url’] = base_url().‘furoms/index/’; no error but nothings change |