开发者

Is 0 necessary in 0777 here in PHP?

开发者 https://www.devze.com 2022-12-23 07:58 出处:网络
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 numbe
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

0

精彩评论

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

关注公众号