Things to Configure Before Coding? |
(07-28-2015, 03:15 AM)solidcodes Wrote: Can you show as example snippet codes of application.php for the benefit of all. In /application/config/autoload.php: PHP Code: $autoload['config'] = array('application'); Then create a file in /application/config named application.php. Put any configuration entries which are specific to your application in this file. For example: PHP Code: $config['site.title'] = 'This is a default title for my pages'; You can see a more detailed example in Bonfire's version of the file. These would all be settings you want available for your application. Some of the settings I included in my example used to be in Bonfire's version of the file, but are now in a settings module which stores the settings in the database and adds a user interface for site admins to change the settings, but there are still plenty of settings in Bonfire's application config. Bonfire's base controller includes its own "autoload" functionality to simplify moving certain types of files (libraries, helpers, and models) from the autoload config. It's important to note, though, that these are loaded later than CI's autoload, so there are some cases where this wouldn't be appropriate. PHP Code: class MY_Controller extends CI_Controller |
Welcome Guest, Not a member yet? Register Sign In |