两个或多个具有相同名称登录模型的已加载 Controller 无法正常工作。
例如,我有两个同名模型,一个是 login_model
,另一个在 admin -> login_model.php
中,然后我想在一个 Controller 中加载这两个模型。
我该怎么做?
最佳答案
试试这个
$this->load->model('admin/login_model' , 'myinterest');
The second parameter (optional) is used to call the method.
ex:
$this->myinterest->get_users();
关于php - Controller 中的 Codeigniter 负载模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37345107/