ftp_base
- Source
wp-admin/includes/class-ftp.php:93
PemFTP base class
Compatibility
- WordPress
- core
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Properties · 34
$LocalEchopublic$Verbosepublic$OS_localpublic$OS_remotepublic$_lastactionpublic$_errorspublic$_typepublic$_umaskpublic$_timeoutpublic$_passivepublic$_hostpublic$_fullhostpublic$_portpublic$_datahostpublic$_dataportpublic$_ftp_control_sockpublic$_ftp_data_sockpublic$_ftp_temp_sockpublic$_ftp_buff_sizepublic$_loginpublic$_passwordpublic$_connectedpublic$_readypublic$_codepublic$_messagepublic$_can_restorepublic$_port_availablepublic$_curtypepublic$_featurespublic$_error_arraypublic$AuthorizedTransferModepublic$OS_FullNamepublic$_eol_codepublic$AutoAsciiExtpublic
Methods · 48
- __construct()
- ftp_base()
- parselisting()
- SendMSG()
- SetType()
- _settype()
- Passive()
- SetServer()
- SetUmask()
- SetTimeout()
- connect()
- quit()
- login()
- pwd()
- cdup()
- chdir()
- rmdir()
- mkdir()
- rename()
- filesize()
- abort()
- mdtm()
- systype()
- delete()
- site()
- chmod()
- restore()
- features()
- rawlist()
- nlist()
- is_exists()
- file_exists()
- fget()
- get()
- fput()
- put()
- mput()
- mget()
- mdel()
- mmkdir()
- glob()
- glob_pattern_match()
- glob_regexp()
- dirlist()
- _checkCode()
- _list()
- PushError()
- PopError()
Source code
class ftp_base { /* Public variables */ var $LocalEcho; var $Verbose; var $OS_local; var $OS_remote; /* Private variables */ var $_lastaction; var $_errors; var $_type; var $_umask; var $_timeout; var $_passive; var $_host; var $_fullhost; var $_port; var $_datahost; var $_dataport; var $_ftp_control_sock; var $_ftp_data_sock; var $_ftp_temp_sock; var $_ftp_buff_size; var $_login; var $_password; var $_connected; var $_ready; var $_code; var $_message; var $_can_restore; var $_port_available; var $_curtype; var $_features; var $_error_array; var $AuthorizedTransferMode; var $OS_FullName; var $_eol_code; var $AutoAsciiExt; /* Constructor */ function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) { $this->LocalEcho=$le; $this->Verbose=$verb; $this->_lastaction=NULL; $this->_error_array=array(); $this->_eol_code=array(FTP_OS_Unix=>"\n", FTP_OS_Mac=>"\r", FTP_OS_Windows=>"\r\n"); $this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY); $this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS'); $this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT"); $this->_port_available=($port_mode==TRUE); $this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support")); $this->_connected=FALSE; $this->_ready=FALSE; $this->_can_restore=FALSE; $this->_code=0; $this->_message=""; $this->_ftp_buff_size=4096; $this->_curtype=NULL; $this->SetUmask(0022); $this->SetType(FTP_AUTOASCII); $this->SetTimeout(30); $this->Passive(!$this->_port_available); $this->_login="anonymous"; $this->_password="[email protected]"; $this->_features=array(); $this->OS_local=FTP_OS_Unix; $this->OS_remote=FTP_OS_Unix; if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows; elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac; } function ftp_base($port_mode=FALSE) { $this->__construct($port_mode); } // <!-- --------------------------------------------------------------------------------------- -->// <!-- Public functions -->// <!-- --------------------------------------------------------------------------------------- -->Changelog
Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-admin/includes/class-ftp.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.