php fnmatch 文件名匹配模式
fnmatch
( PHP 4中“ = 4.3.0 , PHP 5中)
fnmatch -对一个文件名匹配模式
描述
布尔fnmatch (字符串$模式,字符串$字符串[摘要$国旗= 0 ] )
fnmatch ( )检查,如果将通过字符串匹配给定的壳牌通配符模式。
参数
模式
在shell通配符模式。
字符串
测试字符串。这个功能是特别有用的文件名,但也可用于普通字符串。
一般使用者可以用来壳牌模式,或者至少在其最简单的形式,以' ? '和' * '通配符如此使用fnmatch ( ) ,而不是preg_match ( )的前端输入搜索表达方式可能会更方便的非编程的用户。
旗帜
一个FNM_XXX常数。
返回值
返回TRUE如果有比赛,假以其他方式。
修改
版本说明
5.3.0这一功能现在可以在Windows平台上。
实例
例如# 1检查颜色名称对一个shell通配符模式
if (fnmatch("*gr[ae]y", $color)) {
echo "some form of gray ...";
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version
Chinese version, very easy to use

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
