site_url() attaching suffix more than once with pagination - 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: site_url() attaching suffix more than once with pagination (/showthread.php?tid=15740) |
site_url() attaching suffix more than once with pagination - El Forum - 02-13-2009 [eluser]mrmeyers99[/eluser] In my config file I have: $config['url_suffix'] = ".php"; When I initalize my pagination class I set $config['base_url'] = site_url('controller/function/'.$param1); For some reason when I do create_links() It prints out http://localhost/controller/function/param1.php.php/pagination_start for all the links. Then when I click on the link the next time it has 3 .phps. To fix it I created a MY_Config class and changed the site_url() to the following: Code: if (is_array($uri)) That fixed this error. This was only a problem with the pagination class, but I would recommend adding the check to see if the suffix is already there. |