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

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

WBOY
Release: 2016-06-13 12:27:26
Original
744 people have browsed it

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template