當前位置: 首頁> 函數類別大全> fileatime

fileatime

獲取文件的最後訪問時間
名稱:fileatime
分類:文件系統
所屬語言:php
一句話介紹:返回文件的上次訪問時間。

實例

<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>

輸出:

 1140684501
Last access: February 23 2006 09:48:21.
同類函數
  • 獲取文件權限 fileperms

    fileperms

    獲取文件權限
  • fwrite 的別名 fputs

    fputs

    fwrite的別名
  • 將數據(但不是元數據)同步到文件 fdatasync

    fdatasync

    將數據(但不是元數據)同步到文件
  • 倒回文件指針的位置 rewind

    rewind

    倒回文件指針的位置
  • 將文件截斷到給定的長度 ftruncate

    ftruncate

    將文件截斷到給定的長度
  • 將緩衝內容輸出到文件 fflush

    fflush

    將緩衝內容輸出到文件
  • 獲取真實路徑緩衝區的大小 realpath_cache_size

    realpath_cache_size

    獲取真實路徑緩衝區的大小
  • 獲取文件大小 filesize

    filesize

    獲取文件大小