Welcome Guest, Not a member yet? Register   Sign In
How to use _remap function?
#5

[eluser]sunyoupk[/eluser]
[quote author="Michael Wales" date="1211128600"]By default CodeIgniter uses segment to determine the method you want, for example:
domain.com/user/walesmd

Would attempt to use the walesmd() method of the user class.

With _remap - it keeps CodeIgniter from using that logic and does whatever you tell it to. So, you could do something like:
Code:
<?php
  function _remap($username) {
    $this->load->model('users');
    $this->data->user = $this->users->get($username);
    $this->load->view('profile', $this->data);
  }
?>

Personally, URI Routing is a much more graceful way to go about this.[/quote]

Ok, thanks!
Continue my efforts to do~!


Messages In This Thread
How to use _remap function? - by El Forum - 05-17-2008, 11:56 AM
How to use _remap function? - by El Forum - 05-17-2008, 12:32 PM
How to use _remap function? - by El Forum - 05-18-2008, 01:16 AM
How to use _remap function? - by El Forum - 05-18-2008, 05:36 AM
How to use _remap function? - by El Forum - 05-18-2008, 10:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB