duanjue7745 2017-01-18 10:27
浏览 34
已采纳

如何将模块化扩展wiredesignz添加到codeigniter 3.0

I'm trying to add third party extension to create a HMVC application using Codeigniter 3.0

But when I'm adding MY_Loader and MY_Router files into the core folder and MX folder in the Third_party folder, it generates a fatal error:

Fatal error: Call to undefined method MY_Loader::_ci_object_to_array() in C:\xampp\htdocs\codeigniter\application\third_party\MX\Loader.php on line 300.

When I remove them, the application works perfectly. Are there any additional settings that are needed to get the application running?

  • 写回答

5条回答 默认 最新

  • doumengjing1500 2017-01-18 11:12
    关注

    It happens because the function used in MX/Loader.php no longer exists in CodeIgniter.

    You can add it back to Loader.php

    protected function _ci_object_to_array($object) {
        return is_object($object) ? get_object_vars($object) : $object;
    }
    

    Source

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?