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
  • Return the target of the symbolic link readlink

    readlink

    Returnthetargetofthe
  • Close process file pointer pclose

    pclose

    Closeprocessfilepoin
  • Set file access and modification time touch

    touch

    Setfileaccessandmodi
  • Get file information through the opened file pointer fstat

    fstat

    Getfileinformationth
  • Close an open file pointer fclose

    fclose

    Closeanopenfilepoint
  • Determine whether the given file name is a normal file is_file

    is_file

    Determinewhethertheg
  • Get information about a connection linkinfo

    linkinfo

    Getinformationabouta
  • Find file paths that match patterns glob

    glob

    Findfilepathsthatmat
Popular Articles