Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [config]
- db.set.user = hello
- db.set.pass = secrate
- <?php
- class IndexController extends Zend_Controller_Action
- {
- public function indexAction()
- {
- // Load/Open the file
- $config = new Zend_Config_Ini(
- APPLICATION_PATH . '/configs/httpd.conf',
- 'config',
- array('skipExtends'=> true,'allowModifications' => true)
- );
- // Output the value
- echo $config->db->set->user;
- // Change the value
- $config->db->set->user ="change";
- // Write it.
- $writer = new Zend_Config_Writer_Ini(
- array('config' => $config,
- 'filename' => APPLICATION_PATH . '/configs/httpd.conf'));
- $writer->write();
- }
- }
Add Comment
Please, Sign In to add comment