dongyuqie4322 2012-01-19 14:58
浏览 41
已采纳

在codeigniter中使用自定义库2扩展自定义库1?

I have a custom library that we will call library1. I'm trying to extended library1 with another custom library called library2.

I could do a require_once and include library1 in library2. The other option would be to have library2 use codeigniters load method and load library1 from inside library2.

Any one have any thoughts on why one way is better than the other?

  • 写回答

2条回答 默认 最新

  • dqsvnsad79721 2012-01-20 03:55
    关注

    First of all, "oop"? I think you are seriously missing the point of mcv, secondly check this here

    "CodeIgniter’s Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. When CodeIgniter runs it follows a specific execution process, diagramed in the Application Flow page. There may be instances, however, where you’d like to cause some action to take place at a particular stage in the execution process. For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of your own scripts in some other location."

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

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集