如何用php创建与删除多级目录函数
function deldir( $dir ) { $dh =opendir( $dir ); while ( $file =readdir( $dh )) { if ( $file != "." && $file != ".." ) { $fullpath = $dir . "/" . $file ; if (! is_dir ( $fullpath )) { unlink( $fullpath ); } else { $this -> deldir( $fullpath ); } } } closedir ( $dh ); if ( rmdir ( $dir )) { return true; } else { return false; } } function createFolder( $path ) { if (! file_exists ( $path )){ createFolder(dirname( $path )); mkdir ( $path , 0777); } }查看更多关于如何用php创建与删除多级目录函数 - php函数的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did30594