Home > Backend Development > PHP Tutorial > PHP loop creation directory example sharing_PHP tutorial

PHP loop creation directory example sharing_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:36:50
Original
1023 people have browsed it

This article mainly introduces the example of php loop creation directory. The principle is to continuously try to create the upper directory, and so on. Friends in need can refer to it

​ The code is as follows: function mk_dir($dir, $mod = 0777) { ​if(!is_dir($dir) || mkdir($dir, $mod)) {   if(!mk_dir(dirname($dir, $mod)))   { Return false;   } } Return mkdir($dir, $mod); } ​ Principle: Just keep trying to create upper-level directories, and so on.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/737706.htmlTechArticleThis article mainly introduces the example of php loop creation directory. The principle is to continuously try to create the upper directory, and so on. Friends in need can refer to the following code: function mk_dir($d...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template