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.

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filemtime</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"test.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token string double-quoted-string">"Last modified: "</span><span class="token operator">.</span><span class="token function">date</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"F d Y H:i:s."</span><span class="token punctuation">,</span><span class="token function">filemtime</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"test.txt"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

1139919766
Last modified: February 14 2006 13:22:46.
Similar Functions
  • is_writable alias is_writeable

    is_writeable

    is_writablealias
  • Read the entire file into an array file

    file

    Readtheentirefileint
  • Open process file pointer popen

    popen

    Openprocessfilepoint
  • Return to the directory part in the path dirname

    dirname

    Returntothedirectory
  • Read files (safely used in binary files) fread

    fread

    Readfiles(safelyused
  • alias for fwrite fputs

    fputs

    aliasforfwrite
  • Format input from a file fscanf

    fscanf

    Formatinputfromafile
  • Create a file with a unique file name tempnam

    tempnam

    Createafilewithauniq
Popular Articles