Easy Tutorial
❮ Func Filesystem Touch Func Error Restore Exception Handler ❯

PHP ftp_size() Function



Definition and Usage

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

This function returns the size of the specified file in bytes, or -1 on error.

Syntax

Parameter 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 above code will output:


❮ Func Filesystem Touch Func Error Restore Exception Handler ❯