ftp_mdtm
Returns the last modification time of the specified file.
The ftp_mdtm()
function returns the last modification time of the specified file.
<?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
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. |