kohana框架学习2

什么是级联系统:

cascade sysytem:待学习。

class文件:在class下文件无论在那个子目录下面,kohana的级联系统都可以找到你的文件。目录位置的优先级:application>

modules>system;

config配置文件的编写和调用:

php中配置文件一般由数组组成:

如:/modules/Auth/config/auth.php(配置文件名要小写)

<?php defined('SYSPATH') OR die('No direct access allowed.');

return array(

    'driver'       => 'File',
    'hash_method'  => 'sha256',
    'hash_key'     => NULL,
    'lifetime'     => 1209600,
    'session_type' => Session::$default,
    'session_key'  => 'auth_user',

    // Username/password combinations for the Auth File driver
    'users' => array(
        // 'admin' => 'b3154acf3a344170077d11bdb5fff31532f679a1919e716a02',
    ),

);

提取配置文件:

        $config=Kohana::$config->load("test");
        echo $config->get("driver");
原文地址:https://www.cnblogs.com/canbefree/p/3660772.html