install/remove_install_dir.php

00001 <?php
00002 
00003  if(file_exists("../install")) {
00004    rmdirRecursive("../install");
00005  }
00006  if(file_exists("../install")) {
00007   echo "install-directory writeprotected<br>";
00008  }
00009  else {
00010   echo "install-directory has been removed<br>";
00011  }
00012   echo "-> return to <a href='../index.php'>login-page</a>";
00013 
00014 
00015 function rmdirRecursive($path,$followLinks=false) {
00016 
00017    $dir = opendir($path) ;
00018    while ( $entry = readdir($dir) ) {
00019 
00020        if ( is_file( "$path/$entry" ) || ((!$followLinks) && is_link("$path/$entry")) ) {
00021            @unlink( "$path/$entry" );
00022        } elseif ( is_dir( "$path/$entry" ) && $entry!='.' && $entry!='..' ) {
00023            rmdirRecursive( "$path/$entry" ) ;
00024        }
00025    }
00026    closedir($dir) ;
00027    return @rmdir($path);
00028 }
00029 
00030 
00031 ?>

Generated on Sun Mar 4 17:19:28 2007 for streber by  doxygen 1.5.1-p1