Home  >  Article  >  php教程  >  一句话删除目录下所有文件

一句话删除目录下所有文件

WBOY
WBOYOriginal
2016-06-13 10:48:08891browse

    不废话,看代码。
 
 
    array_map('unlink',glob('*'));
?>
 
抛砖引玉而已,有很多朋友可能还不知道有glob这个函数吧。更多的用法看手册吧。
 
Ps:这是一个神奇的函数。
 
作者B4dboy's Blog

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