zoukankan      html  css  js  c++  java
  • elite核心库的加载方式及自动加载类库

    位于application的config文件:autoload.php是CI的可以指定自动加载的配置文件:

    为了能自动加载elite的核心代码,需要以包的形式加载HMVC的MX文件,他们位于thirdpary文件夹中,和elite的位置。

    代码中,一些类库为常用类库,故自动加载。自动加载的类库不宜很多,只需要加载核心和经常用的类库。

    代码:

     1 $autoload['packages'] = array(
     2             realpath(APPPATH .'../elite'),    // elite Core
     3         APPPATH.'third_party'    
     4 );
     5 
     6 
     7 /*
     8 | -------------------------------------------------------------------
     9 |  Auto-load Libraries
    10 | -------------------------------------------------------------------
    11 | These are the classes located in the system/libraries folder
    12 | or in your application/libraries folder.
    13 |
    14 | Prototype:
    15 |
    16 |    $autoload['libraries'] = array('database', 'email', 'xmlrpc');
    17 */
    18 
    19 $autoload['libraries'] = array('database','events');
  • 相关阅读:
    kafka----简单的脚本命令重点
    kafka简单学习----遇到的问题
    nc简单使用
    kafka-sparkstreaming---学习1
    sparkStream---1
    装系统
    spark入门备忘---1
    linux---学习3
    MySql-5.7.17-20解压缩版安装配置
    springboot动态定时任务
  • 原文地址:https://www.cnblogs.com/kelite/p/2892153.html
Copyright © 2011-2022 走看看