Say i have a current url showing http://localhost.com/welcome/blah_blah
,from this url i am expecting to get only http://localhost.com/
into a page.
How to do this??
I know echo current_url();
gives full url. But i want only the http://localhost.com
excluding controller_name,clasname etc.
Expected output
if my base_url=http://www.exaple.com/folder
& current_url=http://exaple.com/folder/class/method/blah_blah
,then i want domain name as exaple.com
NOT the www.exaple.com
!
I am facing a issue .