Exemple #1
0
 function fs_rmobj($o)
 {
     $o = str_replace("\\", "/", $o);
     if (is_dir($o)) {
         if (substr($o, strlen($o) - 1, strlen($o)) != "/") {
             $o .= "/";
         }
         return fs_rmdir($o);
     } elseif (is_file($o)) {
         return unlink($o);
     } else {
         return false;
     }
 }
 function fs_rmobj($o)
 {
     $o = str_replace("\\", DIRECTORY_SEPARATOR, $o);
     if (is_dir($o)) {
         if (substr($o, -1) != DIRECTORY_SEPARATOR) {
             $o .= DIRECTORY_SEPARATOR;
         }
         return fs_rmdir($o);
     } elseif (is_file($o)) {
         return unlink($o);
     } else {
         return FALSE;
     }
 }