public function url($controller, $action, $param)
    {
        $path = url();
        if (empty($param)) {
            // return PATH_APP_REL.'/'.$controller.'/'.$action;
            return $path . '/' . $controller.'/'.$action;
        } else {
            // return PATH_APP_REL.'/'.$controller.'/'.$action.'?'.http_build_query($param);
            return $path . '/' . $controller.'/'.$action.'?'.http_build_query($param);
        }
    }
public function url($controller, $action, $param)
    {
        $path = url();
        if (empty($param)) {
            // return PATH_APP_REL.'/'.$controller.'/'.$action;
            return $path . '/' . $controller.'/'.$action;
        } else {
            // return PATH_APP_REL.'/'.$controller.'/'.$action.'?'.http_build_query($param);
            return $path . '/' . $controller.'/'.$action.'?'.http_build_query($param);
        }
    }
public function url ( $ controller , $ action , $ param ) { $ path = url ( ) ; if ( empty ( $ param ) ) { // return PATH_APP_REL.'/'.$controller.'/'.$action; return $ path . '/' . $ controller . '/' . $ action ; } else { // return PATH_APP_REL.'/'.$controller.'/'.$action.'?'.http_build_query($param); return $ path . '/' . $ controller . '/' . $ action . '?' . http_build_query ( $ param ) ; } }
build url with controller action and url param

@param $controller string the controller name
@param $action string the action name
@param $param array the url param

@return string the url
build url with controller action and url param