Home > Backend Development > PHP Tutorial > 自动创建二级目录,该如何解决

自动创建二级目录,该如何解决

WBOY
Release: 2016-06-13 13:39:43
Original
828 people have browsed it

自动创建二级目录
data下有两个文件夹 如果没有该目录自动创建 急需代码

------解决方案--------------------
if(!is_dir('/data/test')){
mkdir('/data/test');
}
......
------解决方案--------------------
if(!file_exists('data/test')){
mkdir('data/test');
}

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