Actions

Difference between revisions of "JURI/getPort"

From Joomla! Documentation

(New page: Returns the port number part of the URI represented by the JURI object. ===Syntax=== string getPort() ===Example=== <source lang="php"> $uri = 'http://fredbloggs:itsasecret@www.example.c...)
 
m (See also: re-categorisation)
 
Line 15: Line 15:
 
* [http://api.joomla.org/Joomla-Framework/Environment/JURI.html#getPort JURI->getPort on api.joomla.org]
 
* [http://api.joomla.org/Joomla-Framework/Environment/JURI.html#getPort JURI->getPort on api.joomla.org]
 
* [[JURI/setPort|JURI->setPort]]
 
* [[JURI/setPort|JURI->setPort]]
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JURI]]</noinclude>
+
<noinclude>[[Category:JURI]]</noinclude>

Latest revision as of 11:34, 9 August 2012

Returns the port number part of the URI represented by the JURI object.

Syntax

string getPort()

Example

$uri = 'http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis';
$u =& JURI::getInstance( $uri );
echo 'Port number is ' . $u->getPort();

would output

Port number is 8080

See also