forked from bcit-ci/CodeIgniter
-
Notifications
You must be signed in to change notification settings - Fork 0
Get domain name
World Wide Web Server edited this page Jul 4, 2012
·
4 revisions
I needed to get the domain name only based on the base_url() function. I added the following function to the url_helper.php :
[code] /**
- Get domain
- Return the domain name only based on the "base_url" item from your config file.
- @access public
- @return string */
function getDomain()
{
So you can use it in your code in the same manner than site_url() or base_url()
Hope this help somebody !