I want to delete the folder which in the linux server using php ??
Scenario::
When user uploads images , A new folder is created based on his name...when i delete the user account,his named folder should be deleted..
I want to delete the folder which in the linux server using php ??
Scenario::
When user uploads images , A new folder is created based on his name...when i delete the user account,his named folder should be deleted..
Use unlink and rmdir. Calling unlink($file)
will delete the file whose filename is $file
, however this is non recursive (it only deletes one file at a time, and won't delete a directory if it is not empty).
There are tons and tons of examples that will recursively delete a directory here : http://fr2.php.net/unlink