Home > Backend Development > PHP Tutorial > php创建多级目录代码_php技巧

php创建多级目录代码_php技巧

WBOY
Release: 2016-05-17 09:36:58
Original
1554 people have browsed it

function createFolder($path)
{
   if (!file_exists($path))
   {
    createFolder(dirname($path));

    mkdir($path, 0777);
   }
}
createFolder("2007/3/4");//在当前目录下创建2007/3/4的目录结构.

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