mk开发者_开发知识库dir("/path/to/my/dir", 0700);
Is the 0 in 0777 necessary?
Yes. The leading zero will make the number interpreted as octal number; without it would be interpreted as decimal number.
var_dump(0700); // int(448)
var_dump(700); // int(700)
The leading zero indicates an octal value. See also the documentation of chmod.
Yes. It's an octal literal
精彩评论