This article describes how to obtain the file size and file creation time in php. It involves the use of filesize and fileatime functions in php and has some reference value. For more information, see
This article describes how to obtain the file size and file creation time in php. It involves the use of filesize and fileatime functions in php and has some reference value. For more information, see
This example describes how to obtain the file size and file creation time in php. Share it with you for your reference. The specific analysis is as follows:
Various attributes of the file can be displayed in php, including the last access time, last modification time, and file size.
Returning information about a file<? Phpprint "The size of the file is"; print filesize ("samplefile.doc"); print"
"; $ Atime = fileatime (" samplefile.doc "); print" This file accessed on "; print date (" l, M d, Y g: I a ", $ atime ); print"
"; $ Mtime = filemtime (" samplefile.doc "); print" This file was modified on "; print date (" l, M d, Y g: I ", $ mtime); print"
"; $ Ctime = filectime (" samplefile.doc "); print" This file was changed on "; print date (" l, M d, Y g: I ", $ ctime);?>
I hope this article will help you with php programming.
,