• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->uri->segment(1) - speed ?

#1
[eluser]matt2012[/eluser]
I've a little stats plugin that I use.

I was wondering how efficient it was to run the code below
or whether I would be better finding out how many segments there
were and calling $CI->uri->segment only for those. This code
is run on every page so its impact is important.



Code:
'seg1' => $CI->uri->segment(1),
'seg2' => $CI->uri->segment(2),
'seg3' => $CI->uri->segment(3),
'seg4' => $CI->uri->segment(4),
'seg5' => $CI->uri->segment(5),
'seg6' => $CI->uri->segment(6),
'seg7' => $CI->uri->segment(7),
'seg8' => $CI->uri->segment(8),


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.