Re: unlink() & rmdir() ... Problems.

From: Date: Tue, 24 Aug 2004 19:29:03 +0000
Subject: Re: unlink() & rmdir() ... Problems.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194630@lists.php.net to get a copy of this message
The reason this works is because you are doing a recursive remove of the directory. The PHP rmdir() does not remove a directory with contents in it. If you modify your script so that it walks the users directory and removes each file and subdirectory then it would probally have worked correctly. I would have mentioned this earlier but I have been away from email for the past day or so. -William On Tue, 24 Aug 2004 14:32:43 -0400, PHP Junkie <phpjunkie@mjimm.com> wrote: > Ave, > > IT WORKS!!! > I guess it was the syntax which was the problem! Finally it works!! > > system("rm -rf $user_dir", $ret_val); > > Works perfectly... Removes folder! > > Thanks a TON! > > > > > On 8/24/04 2:04 PM, "Jason Wong" <php-general@gremlins.biz> wrote: > > > Please do not top post. > > > > On Wednesday 25 August 2004 01:31, PHP Junkie wrote: > >> Ave, > >> > >> Nope... Didn't work. Didn't return an error or anything, didn't delete > >> the > >> folders either! > > > >>>> system('rm -rf',$user_dir,$ret_val); > > > > That should be: > > > > system("rm -rf $user_dir", $ret_val); > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#194630) next »