Phpfnmatch file name matching mode. Phpfnmatch file name matching mode fnmatch (4.3.0, PHP5 in PHP4) fnmatch-description of a Boolean fnmatch (string $ mode, string $ string php fnmatch file name matching mode
Fnmatch
("= 4.3.0, PHP 5" in PHP 4)
Fnmatch-match a file name
Description
Boolean fnmatch (string $ mode, string $ string [Summary $ flag = 0])
Fnmatch () check, if the given Shell wildcard pattern will be matched by a string.
Parameters
Mode
In shell wildcard mode.
String
Test string. This feature is particularly useful for file names, but can also be used for common strings.
Generally, the user can use shell mode, or at least in its simplest form '? The 'and' * 'wildcards use fnmatch (), instead of the preg_match () frontend input search expression, which may be more convenient for non-programmed users.
Flag
A FNM_XXX constant.
Return value
Returns TRUE if there is a race, false in other ways.
Modify
Version description
5.3.0 is now available on Windows.
Instance
For example, #1 check the color name for a shell wildcard pattern
If (fnmatch ("* gr [AE] y", $ color )){
Echo "some form of gray ...";
}
?>
Http://www.bkjia.com/PHPjc/445465.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445465.htmlTechArticlephp fnmatch file name match pattern fnmatch (PHP 4 = 4.3.0, PHP 5) fnmatch-description of a file name match pattern Boolean fnmatch (string $ pattern, string $ string...