duanlie7962 2012-04-05 00:19
浏览 61
已采纳

如何在helper中调用codeigniter函数? [关闭]

I want to know how to call codeigniter functions in a helper is it possible?

Thank You

  • 写回答

1条回答 默认 最新

  • dsqnonh2763 2012-04-05 03:43
    关注

    Per the comments above, you would do the same thing with helpers as you would with libraries. That is, get the CodeIgniter super object via get_instance:

    function some_helper_function(){
    
        $CI =& get_instance();
        // Now you can access whatever CodeIgniter resource via $CI
    
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?