Home  >  Article  >  Backend Development  >  php?剔除目录下的所有东西

php?剔除目录下的所有东西

WBOY
WBOYOriginal
2016-06-13 12:27:26689browse

php?删除目录下的所有东西
如何用php代码删除 templates_c目录下的所有文件?
------解决思路----------------------

foreach(glob('templates_c/*') as $f) unlink($f);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn