Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP ftp_size() Function

PHP ftp_size() Function


PHP FTP Reference Manual Complete PHP FTP Reference Manual


Definition and Usage

The ftp_size() function returns the size of a specified file on the FTP server.

Returns the size of the specified file in bytes, or -1 on error.

Syntax

ftp_size(ftp_connection,file)

Parameters Description
ftp_connection Required. Specifies the FTP connection to use.
file Required. Specifies the file to check.

Tips and Notes

**Note:** Not all FTP servers support this function.


Example

The code above will output:

160


PHP FTP Reference Manual Complete PHP FTP Reference Manual