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

fileperms

獲取文件權限
名稱:fileperms
分類:文件系統
所屬語言:php
一句話介紹:返回文件的權限。

實例

例子1

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">fileperms</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 delimiter important">?></span></span>

輸出:

 33206

例子2

以八進制值返回權限:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">substr</span> <span class="token punctuation">(</span> <span class="token function">sprintf</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"%o"</span> <span class="token punctuation">,</span> <span class="token function">fileperms</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 operator">-</span> <span class="token number">4</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

輸出:

 1777
同類函數
  • 獲取文件類型 filetype

    filetype

    獲取文件類型
  • 將文件截斷到給定的長度 ftruncate

    ftruncate

    將文件截斷到給定的長度
  • 從文件指針中讀取字符 fgetc

    fgetc

    從文件指針中讀取字符
  • disk_free_space 的別名 diskfreespace

    diskfreespace

    disk_free_space的別名
  • 獲取文件所有者 fileowner

    fileowner

    獲取文件所有者
  • 參見unlink() 或unset()(PHP 沒有delete 關鍵詞或函數) delete

    delete

    參見unlink()或unset()(P
  • 從文件指針中讀取一行 fgets

    fgets

    從文件指針中讀取一行
  • 判斷文件是否是通過HTTP POST 上傳的 is_uploaded_file

    is_uploaded_file

    判斷文件是否是通過HTTPPOST上傳的
熱門文章