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

    unlink

    ファイルを削除します
  • ファイルまたはURLを開きます fopen

    fopen

    ファイルまたはURLを開きます
  • 接続に関する情報を取得します linkinfo

    linkinfo

    接続に関する情報を取得します
  • stream_set_write_bufferのエイリアス set_file_buffer

    set_file_buffer

    stream_set_write_buf
  • ファイルステータスキャッシュをクリアします clearstatcache

    clearstatcache

    ファイルステータスキャッシュをクリアしま
  • HTTP投稿を介してファイルがアップロードされているかどうかを判断します is_uploaded_file

    is_uploaded_file

    HTTP投稿を介してファイルがアップロー
  • 実際のパスバッファーのサイズを取得します realpath_cache_size

    realpath_cache_size

    実際のパスバッファーのサイズを取得します
  • ファイル全体を配列に読んでください file

    file

    ファイル全体を配列に読んでください
人気記事(にんききじ)