溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

如何解決CI框架中類的自動加載問題

發(fā)布時間:2021-09-16 14:09:34 來源:億速云 閱讀:104 作者:柒染 欄目:開發(fā)技術(shù)

如何解決CI框架中類的自動加載問題,針對這個問題,這篇文章詳細介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。

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. 系統(tǒng)類庫加載

// $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. 數(shù)據(jù)模型的自動加載

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

關(guān)于如何解決CI框架中類的自動加載問題問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注億速云行業(yè)資訊頻道了解更多相關(guān)知識。

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI