I\'m trying to create function which removes all file and directories on webhosting excluding given files and folders arrays
This question already开发者_开发技巧 has answers here: Closed 11 years ago. Possible Duplicate: A recursive remove directory function for PHP?
Hi I\'m looking for a command similar to this command in Linux: rm -fRv debug/* This command delete all files and directories that is inside debug but without delete the debug directory.
I have a txt file where I list some folders I want to remove from the server (separated by comma). The txt file contains for example:
There is a directory /home/example/public_html/users/files/. Within the directory there are subdirectories with random names like 2378232828923_1298295497.
I have this code to recursive delete files and directories. It works fine but has a little problem. If $path = /var/www/foo/ it will delete everything inside of foo, but not foo. I want to delete foo
OK help me understand this.开发者_Python百科 I have 2 users in my linux system that are BOTH part of \"web-users\" group.
I have this so far: <?php $path = \"files/\"; $files = glob(\"\" . $path . \"{*.jpg, *.gif, *.png}\", GLOB_BRACE);
I wonder, what\'s the easiest way to delete a directory with all its files in it? I\'m using rmdir(PATH . \'/\' . $value); to delete a folder, however, 开发者_如何学Cif there are files inside of it,
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.