Actions

Difference between revisions of "JURI/getPath"

From Joomla! Documentation

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

Latest revision as of 11:33, 9 August 2012

Returns the path part of the URI represented by the JURI object.

Syntax

string getPath()

Example

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

would output

Path is /path/to/Joomla/index.php

See also