You can't. unlink
can only delete files, not directories. You can delete directories with rmdir
, but that will only delete empty directories. You will have to unlink individual files first.
Is it ok to use unlink() to delete a folder? [closed]
-
23-03-2022 - |
Pregunta
Is there any downside to using unlink()
to delete a folder (and its contents) in php?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow