Trying to delete a directory and his hidden files in linux with php -
from command line when use:
rm -fr /path/dir/{*,.??*}
i can delete files in /path/dir
including hidden files, when try make php code:
system('rm -fr /path/dir/{*,.??*}')
nothing happens.
i can't find why doesn't works
finally this:
system('rm -fr /path/dir && mkdir /path/dir);
i removed directory files , after created directory. , work done.
Comments
Post a Comment