reading config file in kohana 3.2
-
18-06-2021 - |
Question
hi friends i know how to read config file in kohana 3.0 my code is
$config_file = Kohana::config('ratna');
$value = $config_file['name'];
here ratna
is config file
like below
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'name' => 'Clarence Ratna',
'tag_line' => "Let's talk about me!",
'qualification'=>"MCA"
);
my question is how read same file in kohana 3.2 ???
Kohana::config('ratna'); method is not working in 3.2
Solution
Kohana::$config->load('ratna');
You can find more information in official docs
OTHER TIPS
You can do it via Config load function.
$config = Kohana::$config->load('database');
//To get Specific Value
//$value = $config->get('Your_Variable');
$name = $config->get('name');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow