我试图在我的服务器上使用 php 创建一个文件夹,当我将它设置为 0777 时它显示为 755?
mkdir($create_path, 0777);
谢谢
我试图在我的服务器上使用 php 创建一个文件夹,当我将它设置为 0777 时它显示为 755?
mkdir($create_path, 0777);
谢谢
这真的对我有用!,你现在应该关闭这个问题!
给777权限!
$estructure = '../files/folderName';
if(!mkdir($estructure, 0777, true)){
echo "<br/><br/>ERROR: Fail to create the folder...<br/><br/>";
} else echo "<br/><br/>!! Folder Created...<br/><br/>";
chmod($estructure, 0777);
好好享受!
尝试这个:
<?php
// files will create as -rw-------
umask(0);
// create a file, eg fopen()
chmod('/path/to/directory', 0777);
?>
进程的 umask 设置为 0022。如果要创建设置了这两个写入位的内容,则需要将其设置为 0。