I can not remove folder |
I'm trying to delete a record from database and remove its own folder. You can see the code below. I wrote "problem occurred- ALWAYS WORK THIS IF". I can not solve this problem. I'm waiting for your help
![]() PHP Code: public function delete($incomingId)
Most likely either the directory is not empty or your script doesn't have permission to delete it. If it's not empty, you could try the file_helper and its delete_files method, which will delete all files within the directory and can optionally delete the directory itself.
It could also contain a hidden file which you would not see.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Okay it's my fault. I changed this
Old code (not work) PHP Code: $delete_folder = rmdir($path); PHP Code: $delete_folder = delete_files($path); |
Welcome Guest, Not a member yet? Register Sign In |