現在の位置: ホーム> 関数カテゴリ一覧> 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

    ファイルタイプを取得します
  • 軽量コンサルテーションファイルロック flock

    flock

    軽量コンサルテーションファイルロック
  • パターンに一致するファイルパスを見つけます glob

    glob

    パターンに一致するファイルパスを見つけま
  • パスのディレクトリパーツに戻ります dirname

    dirname

    パスのディレクトリパーツに戻ります
  • ドキュメントに関する情報を提供します stat

    stat

    ドキュメントに関する情報を提供します
  • 出力ファイル readfile

    readfile

    出力ファイル
  • ファイルの最後のアクセス時間を取得します fileatime

    fileatime

    ファイルの最後のアクセス時間を取得します
  • ファイルからのフォーマット入力 fscanf

    fscanf

    ファイルからのフォーマット入力
人気記事(にんききじ)