Created
January 26, 2016 13:53
-
-
Save roopunk/41dac3fff458e4ea06de to your computer and use it in GitHub Desktop.
hooks.php for Codeigniter Hook for integrating phpdotenv extension by vlucas Raw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| | ------------------------------------------------------------------------- | |
| | Hooks | |
| | ------------------------------------------------------------------------- | |
| | This file lets you define "hooks" to extend CI without hacking the core | |
| | files. Please see the user guide for info: | |
| | | |
| | http://codeigniter.com/user_guide/general/hooks.html | |
| | | |
| */ | |
| $hook['pre_system'] = function() { | |
| $dotenv = new Dotenv\Dotenv(APPPATH); | |
| $dotenv->load(); | |
| }; | |
| /* End of file hooks.php */ | |
| /* Location: ./application/config/hooks.php */ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All the gists in this series :
https://gist.github.com/roopunk/756b3bd1935cac710686
https://gist.github.com/roopunk/18b6bdde6d52bded4f46
https://gist.github.com/roopunk/41dac3fff458e4ea06de
To enable phpdotenv in Codeigniter :
🎉