Sunday 29 March 2009

Code Igniter can't Find a Function

PHP Logo
While working my way thru Professional Code Igniter I ran into this error:


Fatal error: Call to undefined function base_url() in /Users/mw119255/si/ci/book/system/application/views/template.php on line 6


Turns out I forgot to enter the suggested helpers and libraries into autoload.php as listed on page 56 of the book. At the moment I haven't loaded the database library. That will happen after I get the basic UI going and then start working on the functions that rely on the db. The book puts in calls to methods that haven't been written yet as you build the UI. As I prefer a more incremental approach with a working application, I am putting in comments in for those calls. The code is uncommented as each method is built.




No comments:

Post a Comment