Welcome Guest, Not a member yet? Register   Sign In
custom library with parameters : problem
#3

Thanks, but it's not working too because i note that :
- if you load library in the view page, there is error
- if you load library in the controller and then use it in the view, that's working !!
PHP Code:
// controller file
public function method_controller() {
     
$args = array('green''blue');
     
$this->load->library('example'$args);
     
$this->load->view('my_view');

PHP Code:
// view file : my_view.php
     
echo $this->example->get(0); // works 
Perhaps, it's the only way to do that.
Reply


Messages In This Thread
RE: custom library with parameters : problem - by casa - 11-13-2015, 06:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB