php 创建文件夹异常

WBOY
Release: 2016-06-13 11:02:50
Original
960 people have browsed it

php 创建文件夹错误

D:\work3\sinykkphp\includes\upload\userfile/2011/01/12/create dir


Warning: mkdir() [function.mkdir]: No such file or directory in D:\work3\sinykkphp\test-sinykk.php on line 13

?

?

mkdir($path,0777);? 不能同时建两级目录

?

要用循环一个一个建目录如

?

$i = 0;while ([email protected]($path, 0777)) { if (is_dir($path)) break; $i ++;  if (@mkdir($path . str_repeat("/..", $i), 0777)) $i = 0;}
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