note 108637 deleted from function.rmdir by danbrown

From: Date: Mon, 14 May 2012 14:55:56 +0000
Subject: note 108637 deleted from function.rmdir by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187971@lists.php.net to get a copy of this message
Note Submitter: jp92 ---- CARE with the code given by longears simply erase your hard disk. nb: i wonder why my note was removed yesterday and the note containing this dangerous code is still here ? <?php # recursively remove a directory function rrmdir($dir) { foreach(glob($dir . '/*') as $file) { if(is_dir($file)) rrmdir($file); else unlink($file); } rmdir($dir); } ?>

« previous php.notes (#187971) next »