php自动创建多级目录
function makeDir($destFolder)
{
if (! is_dir($destFolder) && $destFolder != './' && $destFolder != '../')
{
$dirname = '';
$folders = explode( '/', $destFolder);
foreach ($folders as $folder)
{
$dirname .= $folder . '/';
if ($folder != '' && $folder != '.' && $folder != '..' && ! is_dir($dirname))
{
mkdir($dirname);
}
}
}
}