I want to get ref value from URI which looks like this http://localhost/project/?ref=6
Now I know that $_GET['ref'] will not work in codeigniter. I tried to enable it by setting $config['allow_get_array'] = TRUE; but it didn't work.
I read on SO somewhere about using $this->input->get('ref') but no luck. Before using it I did loaded input library in config.php.
Note: I want to access this value in model
Added in config.php
$config['uri_protocol'] = "PATH_INFO";
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';
and commented existing $config['uri_protocol'] = 'REQUEST_URI'; and $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
Controller code is:
parse_str($_SERVER['QUERY_STRING'], $_GET);
        $ref = $this->security->xss_clean($_GET['ref']);
        log_message('info','>>>>>>>>>>>>>>>>>>enter email_invites method::'.$ref);
But still I don't get any value and somehow I dont see any of my log messages.