php 文件操作
记录一下:
主要是通过php将某个目录下文件根据文件名copy到相应的目录中
$dirPath = '/test/test/';
$copyPath = '/123/'
$dir = opendir($dirPath);
while( ($file = readdir($dir) != false)
{
if(!is_dir($file))
{
mkdir($file);
}
copy($dirPath.$file,$copyPath.$file);
}
closedir($dir);