1

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 ratnais 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
j0k
  • 22,600
  • 28
  • 79
  • 90
Clarence
  • 896
  • 1
  • 9
  • 27

2 Answers2

2
Kohana::$config->load('ratna');  

You can find more information in official docs

matino
  • 17,199
  • 8
  • 49
  • 58
0

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');
Emran
  • 51
  • 6