PHP ftp_mdtm() Function

The ftp_mdtm() function returns when the specified file was last modified. This function was introduced in PHP 4.

Syntax:

ParameterDescriptionIs compulsory
ftp_streamThe link identifier of the FTP connection.compulsory
remote_fileThe file from which to extract the last modification time.compulsory

Returns

This function returns the last modified time as a Unix timestamp (or -1 on error).

Important note: Not all servers support this function. The ftp_mdtm() function does not work with directories.

Example 1

Output:


PHP ftp mdtm() Function

Example 2

Output:


PHP ftp mdtm() Function
Next TopicPHP FTP




Latest Courses