ftp_base::__construct() –

Description

Usage

ftp_base::__construct( $port_mode, $verb, $le );

Parameters

$port_mode
( mixed ) optional
$verb
( mixed ) optional
$le
( mixed ) optional

Returns

void

Source

File name: wordpress/wp-admin/includes/class-ftp.php
Lines:

1 to 31 of 31
  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->ftp_base::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->ftp_base::SetUmask(0022);
    $this->ftp_base::SetType(FTP_AUTOASCII);
    $this->ftp_base::SetTimeout(30);
    $this->ftp_base::Passive(!$this->_port_available);
    $this->_login="anonymous";
    $this->_password="anon@ftp.com";
    $this->_features=array();
      $this->OS_local=FTP_OS_Unix;
    $this->OS_remote=FTP_OS_Unix;
    $this->ftp_base::features=array();
    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;
  }
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,