![](/img/trans.png)
[英]How can I integrate ion_auth library with CodeIgniter 3 HMVC on Linux?
[英]How can I integrate ion_auth library with CodeIgniter 3 HMVC?
我之前在我的項目中使用過 ion_auth 並且我沒有問題。 現在我有一個采用 HMVC 方法的項目。
這是我在設置中所做的。
我修改了 ion_auth 庫中的負載配置
$this->load->config('auth/ion_auth', TRUE); $this->load->library(array('email')); $this->lang->load('auth/ion_auth'); $this->load->helper(array('cookie', 'language','url')); $this->load->library('session'); $this->load->model('auth/ion_auth_model');
當我在瀏覽器中加載 ion_auth 時,它說,
Unable to load the requested class: Ion_auth
而且我在 Auth 控制器中自動加載庫
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Auth extends MX_Controller {
public $autoload = array(
'libraries' => array(
'auth/Ion_auth', 'form_validation', 'acl'
),
'helper' => array(
'url', 'language'
)
);
function __construct()
{
parent::__construct();
$this->load->database();
//$this->load->library(array('auth/ion_auth','form_validation'));
//$this->load->helper(array('url','language'));
$this->form_validation->set_error_delimiters($this->config->item('error_start_delimiter', 'ion_auth'), $this->config->item('error_end_delimiter', 'ion_auth'));
$this->lang->load('auth');
}
但還是同樣的錯誤。
我不知道我錯過了什么部分。 你能幫助我嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.