Today, we’re going to explore how you can manage multiple applications in the CodeIgniter web framework using a single codebase. In the course of that, we’ll go ahead and create two different CodeIgniter applications that will share the core CodeIgniter codebase.
Working as a CodeIgniter developer, you might have come across the concept of a library that enriches the core framework functionality, and CodeIgniter itself provides lots of useful libraries in the core.
As a CodeIgniter developer, sometimes you end up in a situation that requires you to alter the core of the framework or the execution flow to fulfill your custom requirements. Of course, it’s never recommended to modify the core files as it makes the upgrade process cumbersome. Luckily, the CodeIgniter framework comes with the hooks system, which allows you deal with this scenario.
The benefit of using any full-stack web application framework is that you don’t have to worry about the common tasks like input handling, form validation and the like, as the framework already provides wrappers for those features. Thus, it allows you to concentrate on the business logic of the application rather than reinventing the wheel over and over again.
As a web application developer, form validation is a crucial part of your work, and it should not be underrated as it could lead to security flaws in your application. You should consider it a must if you’re striving to provide a professional end user experience.
The first half of this tutorial explains different ways you can create a zip file using built-in CodeIgniter APIs. We’ll see how to create and save zip files on the server and how you can make them available for download to end users as well.
As a CodeIgniter developer, it’s really important for you to understand how to work with the core session library. Of course, you could always use the default
$_SESSION syntax, but it’s always recommended to use the wrapper instead.