php - Extending CI with own library

Solution:
Your controller needs a constructor. It should look like this:
class Timevalueshow extends Controller{
function __construct(){
parent::__construct();
$params = array('years' => 0,
'rate' => 0,
'principle' => 0,
'periods' => 0,
'isCont' => true
);
$this->load->library('timevalue',$params);
}
function index(){
$this->load->view('Timevalueshow_view');
}
}
Only PHP5 uses the__construct
function. In PHP4 it should look like this:
function Timevalueshow(){
parent::Controller();
}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: videoxxx
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.