Welcome Guest, Not a member yet? Register   Sign In
benchmark
#1

[eluser]dimis[/eluser]
I am trying to do a benchmark as user guide write.
So I write at my view
Code:
<?php echo $this->benchmark->elapsed_time();?>
But it writes nothing, also I wrote at autoload.php
Code:
$autoload['libraries'] = array('database','benchmark');
(if correct)
What is wrong?
#2

[eluser]Sbioko[/eluser]
Because, you can't access CI throught $this in the view file. To do this you need to write code like this:
Code:
$this->load->view('view_file', array('this' => $this));
#3

[eluser]dimis[/eluser]
I do this and inside the action and {elapsed_time} is written.
#4

[eluser]Sbioko[/eluser]
Use {elapsed_time} instead of $this->bencmark->elapsed_time()




Theme © iAndrew 2016 - Forum software by © MyBB