首页 > 其他 > 详细

kohana框架学习2

时间:2014-04-13 11:44:24      阅读:570      评论:0      收藏:0      [点我收藏+]

什么是级联系统:

cascade sysytem:待学习。

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

modules>system;

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

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

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

bubuko.com,布布扣
<?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‘,
    ),

);
bubuko.com,布布扣

提取配置文件:

bubuko.com,布布扣
        $config=Kohana::$config->load("test");
        echo $config->get("driver");
bubuko.com,布布扣

 

 

 

 

 

 

 

 

 

 

 

 

 

kohana框架学习2,布布扣,bubuko.com

kohana框架学习2

原文:http://www.cnblogs.com/canbefree/p/3660772.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!