JFTP/reinit: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m preparing for archive only |
||
| Line 49: | Line 49: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=reinit | category=reinit | ||
category=JFTP | category=JFTP | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 00:36, 25 March 2017
Description
Method to reinitialize the server, ie. need to login again
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
reinit()
Returns
boolean True if successful
Defined in
libraries/joomla/client/ftp.php
Importing
jimport( 'joomla.client.ftp' );
Source Body
function reinit() {
// If native FTP support is enabled lets use it...
if (FTP_NATIVE) {
if (@ftp_site($this->_conn, 'REIN') === false) {
JError::raiseWarning('35', 'JFTP::reinit: Bad response' );
return false;
}
return true;
}
// Send reinitialize command to the server
if (!$this->_putCmd('REIN', 220)) {
JError::raiseWarning('35', 'JFTP::reinit: Bad response', 'Server response: '.$this->_response.' [Expected: 220]' );
return false;
}
return true;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples