代码之家  ›  专栏  ›  技术社区  ›  Simon Perepelitsa

如何在CodeIgniter中从模型加载助手?

  •  8
  • Simon Perepelitsa  · 技术社区  · 16 年前

    ${get_parent_class($this)}->load->helper ('text');
    

    致命错误:对非对象调用成员函数helper()

    4 回复  |  直到 13 年前
        1
  •  -3
  •   GSto    16 年前

    $this->load->helper('helpername') 但如果你采用模型的方法, $this 仅指该模型的(类)实例,而不是CI全局。那行不通!

    // PHP 4
    // $ci =& get_instance();
    // PHP 5    
    $ci = get_instance();
    $ci->load->helper('text');
    
        2
  •  41
  •   doitlikejustin    12 年前

        3
  •  0
  •   oparam    9 年前
    $this->load->helper('helpername')
    
        4
  •  -3
  •   Tudor    14 年前

    推荐文章