Jump to content

PHP delete folder and contents using FTP


Zephni

Recommended Posts

I have made a file explorer for my site so i can upload files, delete them and rename them. Everythings working fine except when i want to delete a folder. I realise you cant use ftp_delete, coz' that only works for files.

 

I have tried rmdir, and even though I am getting no errors, it seems to do nothing :s So what is the best way to delete a folder and its contents using PHP FTP commands?

 

Thanks guys

Link to comment
Share on other sites

How are you checking for the errors? ftp_rmdir() doesn't throw a PHP warning if it fails, like some of the other FTP functions do. At a guess I'd say the problem is down to permissions.

Link to comment
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.