• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing URI Segment Check

#1
[eluser]Unknown[/eluser]
Hello fellow CodeIgniters,

I'm just picking up CodeIgniter once again after a few years out from programming.

I'm currently using the following URL

http://[local domain]/welcome/index/http/404

and pulling my following values
$this->uri->segment(3); = http
$this->uri->segment(4); = 404

However if I remove http and end up with the following url: http://[local domain]/welcome/index/http/404
I want to still be able to pick up the same values ie (
$this->uri->segment(3); = (NULL/FALSE or what ever)
$this->uri->segment(4); = 404
)

Same applies if I miss segment 4 but have segment 3 filled out (
$this->uri->segment(3); = http
$this->uri->segment(4); = (NULL/FALSE or what ever)
)


Catch my drift? What is the best way to do this?

Regards

Jny


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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