Current Location: Home> Function Categories> ftp_mdtm

ftp_mdtm

Returns the last modification time of the specified file.
Name:ftp_mdtm
Category:Uncategorized
Programming Language:php
One-line Description:Returns the last modification time of the specified file.

Definition and usage

The ftp_mdtm() function returns the last modification time of the specified file.

Example

 <?php
$conn = ftp_connect ( "ftp.testftp.com" ) or die ( "Could not connect" ) ;
ftp_login ( $conn , "admin" , "ert456" ) ;

$mod = ftp_mdtm ( $conn , "test.txt" ) ;

//Return the result with Unix timestamp
echo $mod ;
echo "<br />" ;

//Format Unix timestamps as dates
echo date ( DATE_RFC822 , $mod ) ;

ftp_close ( $conn ) ;
?>

Output:

 1140082571
Thu, 16 Feb 2006 10:36:11 CET

grammar

 ftp_login ( ftp_connection , file )
parameter describe
ftp_connection Required. Specifies the FTP connection to be used (the identifier of the FTP connection).
file Required. Specify documents to be inspected.
Similar Functions
Popular Articles