我如何設置文件的屬性爲0777,我通過php創建文件創建的?如何將文件的屬性設置爲0777?
$myFile = "test.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = 'test';
fwrite($fh, $stringData);
fclose($fh);
我如何設置文件的屬性爲0777,我通過php創建文件創建的?如何將文件的屬性設置爲0777?
$myFile = "test.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = 'test';
fwrite($fh, $stringData);
fclose($fh);
chmod("/somedir/somefile", 0777);
根據
如果問題解決了,請接受答案x) –
http://php.net/manual/en/function.chmod.php這是你要找的嗎? –