Welcome Guest, Not a member yet? Register   Sign In
get uri segment for load view
#1

[eluser]Unknown[/eluser]
dear all i have case about uri segment

my url like this:

Code:
localhost/blog/contact

but i cannot load contact

this my controller:

Code:
$request_page = $this->uri->segment(1);
            if($request_page=='contact'){
                    $this->contact();
            }
    function contact()
     {
                $this->load->view('contact');
     }

how i can be load contact using model like that
#2

[eluser]InsiteFX[/eluser]
Change to:
Code:
$request_page = $this->uri->segment(2);

uri->segment(1) is your controller!
#3

[eluser]Unknown[/eluser]
how about if i using function _remap()
any setup for this condition to be running

thx before
#4

[eluser]InsiteFX[/eluser]
If your use _remap then you need to check for it in your _remap method and then call your contact method.




Theme © iAndrew 2016 - Forum software by © MyBB