Home  >  Article  >  Backend Development  >  php 创建文件夹异常

php 创建文件夹异常

WBOY
WBOYOriginal
2016-06-13 11:02:50928browse

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;}
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
Previous article:php的gdchart引见Next article:php上载文件