I have a Codeigniter controller which takes a full URL as the first argument, but the passed URL inside my controller only is only showing http:
public function mydata($link)
{
echo $link; //then it show only http: rather than the full url http://abc.com
}
How can i solve this issue?
In Codeigniter controllers, each method argument comes from the URL separated by a
/slash.http://example.comThere are a few different ways to piece together the the arguments into one string:
However:
In your case, the double slash
//may be lost using either of those methods because it will be condensed to one in the URL. In fact, I’m surprised that a URL like:…didn’t trigger Codeigniter’s “The URI contains disallowed chatacters” error. I’d suggest you use query strings for this task to avoid all these problems: