Welcome Guest, Not a member yet? Register   Sign In
route system
#5

(08-28-2016, 11:22 AM)kh8b8r Wrote: i want to route like this

ex: 

http://localhost/index.php/user/USERNAME_FROM_MYSQL



PHP Code:
class Host extends CI_Controller {


public function ?()
{

}



routes.php

PHP Code:
$route['user/(:any)'] = 'user/get/$1'

Controller: User.php

PHP Code:
class User extends CI_Controller
{
    
function get($username)
 
   {
        .. some codes ..
 
   }


CHEERS~!
[Just a programmer] Cool [/Just a programmer]
Reply


Messages In This Thread
route system - by kh8b8r - 08-28-2016, 11:22 AM
RE: route system - by cartalot - 08-29-2016, 11:28 AM
RE: route system - by dmyers - 08-29-2016, 12:11 PM
RE: route system - by InsiteFX - 08-29-2016, 01:23 PM
RE: route system - by Joel Catantan - 08-29-2016, 06:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB