Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of automatic loading of classes in CI Framework

Shulou Source: shulou.com Published: 2022-06-03 13:07:31 11月14日 Update

How to solve the automatic loading problem of classes in CI framework, for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more small partners who want to solve this problem find a simpler and easier way.

application/config

Add to profile:

| 1. Packages

| 2. Libraries

| 3. Helper files

| 4. Custom config files

| 5. Language files

| 6. Models

1. Third-party library file loading

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

2. system class library loading

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

3. Help file loading

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

4. profile load

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

5. Language file loading

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

6. Automatic loading of data models

//$autoload <$'model'] = array ('model 1','model 2');$autoload <$'model'] = array (''); The answer to the problem of automatic loading of classes in CI framework is shared here. I hope the above content can be helpful to everyone. If you still have a lot of doubts, you can pay attention to the industry information channel for more relevant knowledge.

Tags: Questions files help framework more solutions configuration easy easy content guys partners library files data methods models knowledge third parties articles systems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Apple MariaDB OPPO Reno vpn