PHP ftp_size() Function
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
Complete PHP FTP Reference Manual