PHP - Get timestamp for completing download of downloaded file

Is it possible to get the date the file was uploaded to FTP? Not created .

Its use will be on the system in which I upload files for viewing by the client, which will be displayed on the dynamic page, and should be marked from the moment of their last change.

I basically need to get the time when the file has finished transferring to FTP - through the FTP client that I downloaded.

+6
source share
1 answer

Use the PHP stat () function. It returns all the data you need to know.

http://php.net/manual/en/function.stat.php

<?php /* Get file stat */ $stat = stat('C:\php\php.exe'); /* * Print file access time, this is the same * as calling fileatime() */ echo 'Access time: ' . $stat['atime']; /* * Print file modification time, this is the * same as calling filemtime() */ echo 'Modification time: ' . $stat['mtime']; /* Print the device number */ echo 'Device number: ' . $stat['dev']; ?> 

I think that in your case this is β€œfile modification time” - this is the answer.

+4
source

Source: https://habr.com/ru/post/888178/


All Articles