| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Environment |
JURI |
setPassword |
setPassword() |
Never | Work in Progress |
Sets the URI password.
void setPassword ( $pass )
| $pass | string | is a string containing the new URI password. |
Example
$uri = new JURI( 'http://www.joomla.org?action=help#create' ); echo "Before: " . $uri->toString(); $uri->setUsername( 'user' ); $uri->setPassword( 'secret' ); echo "After: " . $uri->toString();
might produce:
Result
Before: http://www.joomla.org?action=help#create After: http://user:secret@www.joomla.org?action=help#create