【问题标题】:How can I integrate ion_auth library with CodeIgniter 3 HMVC on Linux?如何在 Linux 上将 ion_auth 库与 CodeIgniter 3 HMVC 集成?
【发布时间】:2017-06-04 21:12:59
【问题描述】:

我正在使用 codeigniter、hmvc 和 ion_auth 编写一个基本应用程序。我已经在应用程序/模块/用户中加载了 ion_auth。一切都在我的 Windows 开发 PC 上运行,但是当应用程序启动时,我的托管服务器 (linux) 上出现错误:

  Message: Unable to locate the model you have specified: Ion_auth_model

在modules/Users/library/Ion_auth.php中,我尝试如下加载模型:

  $this->load->model('Users/Ion_auth_model', 'ion_auth_model');

模型文件位于 modules/Users/models/Ion_auth_model.php。

我尝试了许多不同的文件名组合。我知道 Linux 区分大小写。有什么建议么?我错过了一些简单的东西吗?

【问题讨论】:

  • 因此,作为健全性检查,我将 Ion_auth_model.php 文件移动到 application/models 并将加载函数更改为加载模型的标准方式。好像可以,但是为什么我用的是hmvc,在Users目录下就不行了?

标签: php codeigniter hmvc ion-auth


【解决方案1】:

首先,您的文件夹名称必须以小写字符开头。 .. 将 Ion Auth 保存在其自己的模块文件夹中...您的模块文件夹必须如下所示:

模块 ∟家 ∟ 管理员 ∟ 认证 ∟ 控制器 ∟ 型号 ∟ 观看次数 ∟ 图书馆 ∟ 配置 ∟ 语言

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-08
    • 1970-01-01
    • 2017-12-04
    • 2012-06-21
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    • 1970-01-01
    相关资源
    最近更新 更多