![]() |
Getting errors after changing routes - 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: Getting errors after changing routes (/showthread.php?tid=53550) |
Getting errors after changing routes - El Forum - 07-28-2012 [eluser]jshultz[/eluser] I was working on making my routes file dynamically updated from the database. Unfortunately, my cunning plan has caused some problems. I added this line to the end of routes.php in the config file: Code: include_once APPPATH . "cache/routes.php"; The routes.php file in the cache folder is getting updated automatically which is nice. Currently, it looks likes this: Code: $route["index"] = "pages/index/1"; The problem is, i'm getting these errors at the top of every page: Quote:A PHP Error was encountered I thought maybe it was a permissions error but I don't know? Any ideas? Getting errors after changing routes - El Forum - 07-29-2012 [eluser]jshultz[/eluser] Here's the solution. First, routes.php in the application/cache folder needs to have <?php at the beginning. Since the controller that writes the file writes a whole new file each time I needed to update that controller to the following: Code: public function save_routes() |