Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // funkce destroy(); není moje
- define('PATH', '../gallery/');
- function destroy($dir) {
- $mydir = opendir($dir);
- while(false !== ($file = readdir($mydir))) {
- if($file != "." && $file != "..") {
- chmod($dir.$file, 0777);
- if(is_dir($dir.$file)) {
- chdir('.');
- destroy($dir.$file.'/');
- rmdir($dir.$file) or DIE("couldn't delete $dir$file<br />");
- }
- else
- unlink($dir.$file) or DIE("couldn't delete $dir$file<br />");
- }
- }
- closedir($mydir);
- }
- destroy(PATH);
- echo 'all done.';
- unlink('../index.php');
- rmdir('../gallery');
- echo "hh";
- ?>
Add Comment
Please, Sign In to add comment