the url to access the method is like this:
http://localhost/site/cont/method
I want to access this method using GET method like this:
http://localhost/new-tera/paper/lookup_doi/segment
but my segment
part is already containing /
like this:
http://localhost/lookup_doi/segment/containing/slashes
note that the whole segment/containing/slashes
is one value.
I am getting this value in my method like this:
public function method ($variable)
{
echo $variable;
}
//output: segment
and not : segment/containing/slashes
CodeIgniter passes the rest of them as additional arguments. You can either specify the additional arguments (if the number is fixed) or use:
to get the entire string.
.htaccess mast be
so ok...
results:
and so we mast be have routing! run example(with my projects):
You can base64 encode it first and decode it after. Really, you can use a variety of methods to change the / to something else (i.e. a -) and change it back.
echo site_url('controller/method/' . base64_encode($variable));
public function method ($variable) { $variable = base64_decode($variable); }
you can add slashes by adding "%2F" in your query string hope this will work