JURI/getHost
From Joomla! Documentation
< JURI(Difference between revisions)
(New page: Returns the host part of the URI represented by the JURI object. ===Syntax=== string getHost() ===Example=== <source lang="php"> $uri = 'http://fredbloggs:itsasecret@www.example.com:8080...) |
m (Edit api.joomla.org link) |
||
| (One intermediate revision by one user not shown) | |||
| Line 13: | Line 13: | ||
Host is www.example.com | Host is www.example.com | ||
===See also=== | ===See also=== | ||
| − | * [http://api.joomla.org/Joomla-Framework/Environment/JURI.html#getHost JURI->getHost on api.joomla.org] | + | * [http://api.joomla.org/1.5/Joomla-Framework/Environment/JURI.html#getHost JURI->getHost on api.joomla.org] |
* [[JURI/setHost|JURI->setHost]] | * [[JURI/setHost|JURI->setHost]] | ||
| − | <noinclude> | + | <noinclude>[[Category:JURI]]</noinclude> |
Latest revision as of 12:34, 21 December 2012
Returns the host part of the URI represented by the JURI object.
[edit] Syntax
string getHost()
[edit] Example
$uri = 'http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis'; $u =& JURI::getInstance( $uri ); echo 'Host is ' . $u->getHost();
would output
Host is www.example.com