当前位置: 首页 > 后端技术 > PHP

PHPfnmatch文件系统函数

时间:2023-03-29 23:30:57 PHP

定义和使用fnmatch-将文件名与模式匹配此函数目前在Windows或其他非POSIX兼容系统上不起作用。语法:fnmatch(string$pattern,string$string[,int$flags=0])如果匹配则返回TRUE,否则返回FALSE。if(fnmatch("\*gr\[ae\]y",$color)){echo"someformofgray...";}sscanf()-根据指定格式解析输入字符printf()-输出格式sprintf()-返回格式化字符串