mkdir() not working

前端 未结 8 2150
日久生厌
日久生厌 2021-02-19 23:08

My code

mkdir(\"/some/absolute/path\",0777);

and

mkdir(\"relative/path\", 0777);

is not working, safe mode is

8条回答
  •  一个人的身影
    2021-02-19 23:26

    Do all of the parent directories exist?

    If not, you'll need to enable recursion (assuming PHP5 here):

    mkdir('/path/to/your/dir',0777,true);
    

    EDIT: Didn't see the hidden comment saying that every directory from var downward was set to world-writable, so I'm betting the directory path exists and the above won't be helpful. Sorry!

提交回复
热议问题