function _createDir($htmlDirPath=''){
if (!is_dir($htmlDirPath)){
$temp = explode('/',$htmlDirPath);
$cur_dir = '';
for($i = 0;$i < count($temp);$i++){
$cur_dir .= $temp[$i].'/';
if (!is_dir($cur_dir)){
@mkdir($cur_dir,0777);
}
}
}
}
if (!is_dir($htmlDirPath)){
$temp = explode('/',$htmlDirPath);
$cur_dir = '';
for($i = 0;$i < count($temp);$i++){
$cur_dir .= $temp[$i].'/';
if (!is_dir($cur_dir)){
@mkdir($cur_dir,0777);
}
}
}
}
$t = split('/', $path);
for($i=1; $i<count($t); $i++) {
$p = join('/', array_slice($t, 0, $i+1);
if(! file_exists($p)) {
mkdir($p, 0777);
}else {
die('无法建立'.$p);
}
}
}
{
if(!strlen($path))die('路径不可为空'); $num = count($temp = explode('/',$path)); while($temp)
{
$dir .= $temp[0] . '/';
if(!@file_exists($dir))
{
if(!@mkdir($temp[0],0777))die('无法创建目录' . $temp[0]);
}
$temp = @array_shift($temp);
}//End While}//End Function
12行应该是 mkdir($dir,0777)