現在の位置: ホーム> 関数カテゴリ一覧> fnmatch

fnmatch

パターンでファイル名を一致させます
名前:fnmatch
カテゴリ:ファイルシステム
対応言語:php
一言説明:指定されたパターンに従ってファイル名または文字列を一致させます。

シェルワイルドカードに従ってカラー名を確認してください。

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token variable">$ txt</span> <span class="token operator">=</span> <span class="token string double-quoted-string">"私の車はdarkgreyです..."</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span> <span class="token function">fnmatch</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"*gr [ae] y"</span> <span class="token punctuation">、</span> <span class="token variable">$ txt</span> <span class="token punctuation">)</span> <span class="token punctuation">)</span>
  <span class="token punctuation">{</span>
  <span class="token keyword">エコー</span><span class="token string double-quoted-string">「何らかの形の灰色...」</span> <span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token delimiter important">?></span></span>
類似の関数
  • link()またはunset()を参照してください(PHPにはキーワードや関数の削除がありません) delete

    delete

    link()またはunset()を参照し
  • ディレクトリを削除します rmdir

    rmdir

    ディレクトリを削除します
  • ファイルまたはディレクトリが存在するかどうかを確認します file_exists

    file_exists

    ファイルまたはディレクトリが存在するかど
  • ファイルを削除します unlink

    unlink

    ファイルを削除します
  • データ(メタデータではなく)をファイルに同期させます fdatasync

    fdatasync

    データ(メタデータではなく)をファイルに
  • ハード接続を作成します link

    link

    ハード接続を作成します
  • 出力ファイル readfile

    readfile

    出力ファイル
  • 行をCSVにフォーマットし、ファイルポインターに書き込みます fputcsv

    fputcsv

    行をCSVにフォーマットし、ファイルポイ
人気記事(にんききじ)