用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1617|回复: 2
收起左侧

[HELP] 使用装载器类package如何调用自己建立的model和helper

[复制链接]
发表于 2014-6-11 18:23:33 | 显示全部楼层 |阅读模式
本帖最后由 cxc246809 于 2014-6-11 18:54 编辑

通过加载 package, 调用 library 没有问题,调用  model、和 helper,就会提示找不到指定的模型;代码如下:
-----------------------------------------------------------------------------------------------------------------
$this->load->add_package_path(APPPATH."third_party/cloud_photos/"); //加载package

        $this->load->library("Myalbum","","albums"); //加载library        echo $this->albums->getTime();

        $this->load->model("album_model","album");    //加载model
        echo "<br />".$this->album->get_album_list($this->uid);

        $this->load->helper("mytest"); //加载helper
        echo "<br />".myalbum($this->uid);

-----------------------------------------------------------------------------------------------------------------
加载 helper 时 提示错误 :

                              An Error Was Encountered                Unable to load the requested file: helpers/mytest_helper.php


-----------------------------------------------------------------------------------------------------------------


有会的吗,求解答,谢谢
 楼主| 发表于 2014-6-11 18:24:42 | 显示全部楼层
本帖最后由 cxc246809 于 2014-6-11 18:54 编辑

model 搞定了,现在helper无法调用
 楼主| 发表于 2014-6-11 19:04:08 | 显示全部楼层
已处理,是创建的 helper文件夹 少了一个S, 粗心了,文件夹名称应该是 “helpers”

本版积分规则