Current Location: Home> Function Categories> fileatime

fileatime

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

Example

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">fileatime</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 access: "</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 YH:i:s."</span> <span class="token punctuation">,</span> <span class="token function">fileatime</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>

Output:

 1140684501
Last access: February 23 2006 09:48:21.
Similar Functions
  • Read a line from the file pointer and parse the CSV field fgetcsv

    fgetcsv

    Readalinefromthefile
  • Rename a file or directory rename

    rename

    Renameafileordirecto
  • Create a file with a unique file name tempnam

    tempnam

    Createafilewithauniq
  • Determine whether the file is uploaded through HTTP POST is_uploaded_file

    is_uploaded_file

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

    feof

    Testwhetherthefilepo
  • See unlink() or unset() (PHP does not have delete keywords or functions) delete

    delete

    Seeunlink()orunset()
  • Change file owner chown

    chown

    Changefileowner
  • Group of files obtained filegroup

    filegroup

    Groupoffilesobtained