当保存一个不存在的文件时,关于文件权限的问题。
目前看来一切进展顺利,保存的文件似乎具有模式644
。
我需要做什么改变,才能让文件保存为模式777
?
非常感谢任何提示、线索或答案。我认为与此相关的代码已经包含在内:
/* write to file */
self::writeFileContent($path, $value);
/* Write content to file
* @param string $file Save content to which file
* @param string $content String that needs to be written to the file
* @return bool
*/
private function writeFileContent($file, $content){
$fp = fopen($file, 'w');
fwrite($fp, $content);
fclose($fp);
return true;
}