Home > PHP > Function > FTP > ftp_size()

ftp_size()

ftp_size - Returns the size of the given file

Syntax

int ftp_size (resource $ftp_stream, string $remote_file)

Arguments

  • ftp_stream - The link identifier of the FTP connection.
  • remote_file - The remote file.

Description

ftp_size() returns the size of the given file in bytes.

Version

PHP 4, 5

Return value

Returns the file size on success, or -1 on error.