note 72690 added to function.rmdir

From: Date: Tue, 30 Jan 2007 02:52:27 +0000
Subject: note 72690 added to function.rmdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-122339@lists.php.net to get a copy of this message
I can't figure out why everybody goes to all this trouble if ( is_dir($dir) ) { rm -rf $dir; } you can wrap some platform sniffing code around it too if you care about windows support. Sure it invokes a shell process, but it can't be any slower than writing php code to do this one item at a time. Also you can send it the bg and move on with your script. ---- Server IP: 69.147.83.197 Probable Submitter: 68.183.203.199 ---- Manual Page -- http://www.php.net/manual/en/function.rmdir.php Edit -- https://master.php.net/note/edit/72690 Del: integrated -- https://master.php.net/note/delete/72690/integrated Del: useless -- https://master.php.net/note/delete/72690/useless Del: bad code -- https://master.php.net/note/delete/72690/bad+code Del: spam -- https://master.php.net/note/delete/72690/spam Del: non-english -- https://master.php.net/note/delete/72690/non-english Del: in docs -- https://master.php.net/note/delete/72690/in+docs Del: other reasons-- https://master.php.net/note/delete/72690 Reject -- https://master.php.net/note/reject/72690 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122339) next »