pagination didn't work |
[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.
[eluser]1mr3yn[/eluser]
Code: function furoms($offset=''){
[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.
[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.
[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;
[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?
[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.
[eluser]saidai jagan[/eluser]
$config['base_url'] = base_url().'furoms/'; to $config['base_url'] = base_url().'furoms/index/';
[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
[eluser]marjune[/eluser]
$config[‘base_url’] = base_url().‘furoms/index/’; no error but nothings change |
Welcome Guest, Not a member yet? Register Sign In |