現在の位置: ホーム> 関数カテゴリ一覧> 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
類似の関数
  • 一意のファイル名でファイルを作成します tempnam

    tempnam

    一意のファイル名でファイルを作成します
  • 開いたファイルポインターを介してファイル情報を取得します fstat

    fstat

    開いたファイルポインターを介してファイル
  • 指定されたファイル名が書き込み可能かどうかを判断します is_writable

    is_writable

    指定されたファイル名が書き込み可能かどう
  • ファイルにデータを書き込みます file_put_contents

    file_put_contents

    ファイルにデータを書き込みます
  • ファイルポインターから文字を読み取ります fgetc

    fgetc

    ファイルポインターから文字を読み取ります
  • ファイルまたはURLを開きます fopen

    fopen

    ファイルまたはURLを開きます
  • ファイルまたはディレクトリの名前を変更します rename

    rename

    ファイルまたはディレクトリの名前を変更し
  • ファイル許可を取得します fileperms

    fileperms

    ファイル許可を取得します
人気記事(にんききじ)