Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($val->run())
- {
- $config = array('test' => 'vafoor');
- $path = realpath(APPPATH.'config/production/');
- // If file doesn't exists, we will create it!
- if(!file_exists($path.'/db.php'))
- {
- try
- {
- File::create($path, 'db.php', null);
- }
- catch (InvalidPathException $e)
- {
- // directory can't be written
- }
- catch (FileAccessException $e)
- {
- // file exists so... we can replace the old config :-)!!
- }
- }
- Config::save($path.'/db.php', $config);
Add Comment
Please, Sign In to add comment