If you've been using CodeIgniter or another MVC framework for any length of time, you've probably started to realize the advantage of abstracting data and logic from presentation. But efficiency is not without its drawbacks, and, in the case of CodeIgniter, one of these drawbacks is the need to constantly bounce variables out of your controllers so that they are available within your views.
In this tutorial, I'll show you a really cool way to eliminate this hassle. Become a Premium member to gain access to this tutorial, as well as hundreds of other tutorial, screencasts, and freebies from the Tuts+ network.
We're going to build a config loader that automatically loads all of your important site variables and makes them available globally. Even more cool, your site variables will be stored in a separate config file that you can append or edit whenever you like. Not only will this save you a lot of time (and errors!), but it will help you develop a killer workflow that you can build on for all your projects. Lets get started!
For those unfamiliar, the family of Tuts+ sites runs a premium membership service. For $19 per month, you gain access to exclusive premium tutorials, screencasts, and freebies from Nettuts+, Psdtuts+, Aetuts+, Audiotuts+, Vectortuts+, and CgTuts+. For the price of a pizza, you'll learn from some of the best minds in the business. Become a Premium member to read this tutorial, as well as hundreds of other advanced tutorials and screencasts.