Jump to content

How to delete a folder with PHP?


lopes_andre

Recommended Posts

Hi,

 

I'm trying do delete a folder in PHP but it gives me an error.

 

I have the folder empty but gives me this error:

Message: rmdir(./uploads/69/) [function.rmdir]: Directory not empty

 

I'm using this code:

rmdir($newPath);

 

I'am using Windows in tests, but I will use Linux for production.

 

How can I delete a folder? The folder is empty.

 

Best Regards,

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/196647-how-to-delete-a-folder-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.