CodeIgniter Direct v1.0.0
Use Codeigniter 2.1.0 directly in file.
This isn't recommended to ignore CI MVC standards at all but this feature may help You in the specific situations for who like do everything with Codeigniter. For example when You code for devices or non web based apps or backgrounds.
- Use Codeigniter out of framework for specific situations.
- Do it with minimal change(s) to CI.
- Keep all CI's features/libraries/helpers/drivers etc.. .
Let's talk about it: http://codeigniter.com/forums/viewthread/217554/.
- Download Codeigniter 2.1.0 from codeigniter.com.
- Extract and install Codeigniter to your project directory.
- Download Codeigniter-direct https://github.com/Stunt/Codeigniter-direct.
- Copy and Replace Codeigniter-direct files in your project.
- Create your files in public/ directory and use $CI object. (like the sample : ./public/test.php)
<?php require_once realpath(dirname(__FILE__).'/../direct.php'); // include bootstrap // Include direct.php and you have access to CI object and all Codeignite features. $CI->load->library('user_agent'); echo $CI->agent->browser(); /* End of file ./public/test.php */ ?>
I NEVER FULLY TESTED AND CAN'T QUARANTEE THAT USING CI IN THIS MOD DOSN'T MAKE IT BROKE OR HASN'T BAD EFFECT ON THE PERFORMANCE. BUT IN MY CASE(s) I DOSN'T SEE ANY PROBLEM.