Zephni Posted April 5, 2011 Share Posted April 5, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/232743-php-delete-folder-and-contents-using-ftp/ Share on other sites More sharing options...
Adam Posted April 5, 2011 Share Posted April 5, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/232743-php-delete-folder-and-contents-using-ftp/#findComment-1197134 Share on other sites More sharing options...
Zephni Posted April 5, 2011 Author Share Posted April 5, 2011 Got it working, sorry, it was just a stupid mistake in the end. Quote Link to comment https://forums.phpfreaks.com/topic/232743-php-delete-folder-and-contents-using-ftp/#findComment-1197139 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.