检查文件
file_exists($file);
检查文件夹
is_dir($dir);
输出md5
md5($file;
输出字符串到文件,如果文件不存在自动则自动创建
file_put_contents($file, $outputContent);
从文件读内容
file_get_contents($file);
字符串中是否有正则表达式的格式
preg_match('RegExp',$string);
用正则表达式替换字符串中的相应部分
preg_replace('/RegExp/',$replaceString,$string);
/ / 模式
() 分组
* 0个或多个以上
+ 一个或多个以上
. 任意字符串
[a-zA-Z0-9_] 包含a-z或A-Z或0-9或下划线的字符串 简写为 [w]