Last active
November 8, 2017 16:39
-
-
Save tieutantan/0fe26f7aae26f66e9f6f3762cb0d9e7c to your computer and use it in GitHub Desktop.
Guide use custom Config in FuelPHP
This file contains 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 | |
// load file fuel/app/config/system.php and groupname = name of group config, TRUE = set group config same filename | |
Config::load('system', 'groupname'); | |
// set value for key active in group groupname | |
Config::set('groupname.active', 'ok'); | |
// delete key active in group groupname | |
Config::delete('groupname.active'); | |
// save group 'groupname' system to file system.php | |
Config::save('system', 'groupname'); | |
// example get value of config | |
Debug::dump(Config::get('system')); |
This file contains 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 | |
return array( | |
'active' => 'ok', | |
'text' => 'this is text', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment