Home > PHP > Function > FTP > ftp_alloc()

ftp_alloc()

ftp_alloc - Allocates space for a file to be uploaded

Syntax

bool ftp_alloc (resource $ftp_stream, int $filesize, string &$result)

Arguments

  • ftp_stream - The link identifier of the FTP connection.
  • filesize - The number of bytes to allocate.
  • result - A textual representation of the servers response will be returned by reference in result if a variable is provided.

Description

Sends an ALLOcommand to the remote FTP server to allocate space for a file to be uploaded.

Version

PHP 5

Return value

Returns TRUE on success or FALSE on failure.