Home >Backend Development >PHP Tutorial >php?删除目录下的所有东西

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-20 12:44:30854browse

如何用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
Previous article:PHP:文件加载Next article:php?缓存