发布于 2017-08-01 02:37:25 | 128 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的CodeIgniter 用户指南,程序狗速度看过来!

CodeIgniter开源PHP开发框架

CodeIgniter 是一个简单快速的PHP MVC框架。EllisLab 的工作人员发布了 CodeIgniter。许多企业尝试体验过所有 PHP MVC 框架之后,CodeIgniter 都成为赢家,主要是由于它为组织提供了足够的自由支持,允许开发人员更迅速地工作。


这篇文章主要介绍了CI框架中类的自动加载问题,结合实例形式分析了CI框架中类的自动加载功能与具体操作技巧,需要的朋友可以参考下

本文实例讲述了CI框架中类的自动加载问题。分享给大家供大家参考,具体如下:

application/config

配置文件中添加:

| 1. Packages
| 2. Libraries
| 3. Helper files
| 4. Custom config files
| 5. Language files
| 6. Models

1. 第三方库文件加载


// $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
$autoload['packages'] = array();

2. 系统类库加载


// $autoload['libraries'] = array('database', 'session', 'xmlrpc');
$autoload['libraries'] = array('database','session','form_validation','pagination','upload','curl','user_agent');

3. 帮助文件加载


// $autoload['helper'] = array('url', 'file');
$autoload['helper'] = array('url','cookie','form','captcha','string','html','array','date','file','common');

4. 配置文件加载


// $autoload['config'] = array('config1', 'config2');
$autoload['config'] = array();

5. 语言文件加载


// $autoload['language'] = array('lang1', 'lang2');
$autoload['language'] = array();

6. 数据模型的自动加载


//$autoload['model'] = array('model1', 'model2');
$autoload['model'] = array('');

希望本文所述对大家基于CodeIgniter框架的PHP程序设计有所帮助。



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务