可能重复:
What are the default permissions when creating a file with fopen() in php?
我在我的CentOS 6 VPS上安装了PHP5,我遇到了一些问题,我需要在其中使用Fwrite授予777访问我的脚本,在编辑文件时修复777更改,但是当我尝试创建时一个新文件,例如:
$fopen = fopen("../pages/".$_GET["mp"].".php", "w");
fwrite($fopen, $_POST["content"]);
fclose($fopen);
它不会创建页面。这种用法在我的传统Hostgator托管上已经很好了,但现在在我的VPS上,即使我给脚本创建了777文件,但是在某处允许创建页面的权限被拒绝。