function mk_dir($str_path)
{
if (stristr($str_path, ".")) {
$str_path = dirname($str_path);
}
if (is_dir($str_path) || stristr($str_path, ".")) {
//已存在
$_str_alert = "y030201";
} else {
$_arr_dir = $this->mk_dir(dirname($str_path));
//创建目录
if ($_arr_dir["alert"] == "y030201") {
if (mkdir($str_path)) {
//创建成功
$_str_alert = "y030201";
} else {
$_str_alert = "x030201";
//失败
}
} else {
$_str_alert = "x030201";
}
}
return array("alert" => $_str_alert);
}