Current Location: Home> Function Categories> filemtime

filemtime

Get file modification time
Name:filemtime
Category:File system
Programming Language:php
One-line Description:Returns the last modified time of the file.

Definition and usage

filemtime() function returns the last time the file content is modified.

If successful, the time is returned as a Unix timestamp. If it fails, return false.

实例

<?php
echo filemtime("test.txt");
echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt"));
?>

输出:

1139919766
Last modified: February 14 2006 13:22:46.

grammar

 filemtime ( filename )
parameter describe
filename Required. Specify documents to be inspected.

illustrate

This function returns the last time the data block in the file was written, that is, the last time the content of the file was modified.

Similar Functions
  • Write to files (safely used in binary files) fwrite

    fwrite

    Writetofiles(safelyu
  • Determine whether the given file name is writable is_writable

    is_writable

    Determinewhethertheg
  • Create a temporary file tmpfile

    tmpfile

    Createatemporaryfile
  • Returns the available space on the file system or disk partition disk_free_space

    disk_free_space

    Returnstheavailables
  • Read characters from file pointer fgetc

    fgetc

    Readcharactersfromfi
  • Open process file pointer popen

    popen

    Openprocessfilepoint
  • Delete directory rmdir

    rmdir

    Deletedirectory
  • Test whether the file pointer reaches the end of the file feof

    feof

    Testwhetherthefilepo
Popular Articles