开发者

php copy file with its path

in php: how to copy a file existng in 1/2/3 directory to folder 0 , but if the nested folders 1/2/3 are not exist in 0, it should create that folders (1 and 2 and 3), then copy the file into.开发者_如何转开发 thanks.


You need to call mkdir with the recursive flag before runing the copy

mkdir("/path/to/my/dir", 0700,true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜