ftp_base::fput() –

You appear to be a bot. Output may be restricted

Description

Usage

ftp_base::fput( $remotefile, $fp, $rest );

Parameters

$remotefile
( mixed ) required
$fp
( mixed ) required
$rest
( mixed ) optional

Returns

void

Source

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

1 to 23 of 23
  function fput($remotefile, $fp, $rest=0) {
    if($this->_can_restore and $rest!=0) fseek($fp, $rest);
    $pi=pathinfo($remotefile);
    if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
    else $mode=FTP_BINARY;
    if(!$this->_data_prepare($mode)) {
      return FALSE;
    }
    if($this->_can_restore and $rest!=0) $this->ftp_base::restore($rest);
    if(!$this->_exec("STOR ".$remotefile, "put")) {
      $this->_data_close();
      return FALSE;
    }
    if(!$this->ftp_base::_checkCode()) {
      $this->_data_close();
      return FALSE;
    }
    $ret=$this->_data_write($mode, $fp);
    $this->_data_close();
    if(!$this->_readmsg()) return FALSE;
    if(!$this->ftp_base::_checkCode()) return FALSE;
    return $ret;
  }
 

 View on GitHub View on Trac