I am having trouble writing to a file, although is_writable()
returns true. Of course, the file exists and is apparently readable. Here is the code:
$file = "data"; echo file_get_contents($file)."<br>"; echo is_writable($file) ? "is writable<br>" : "not writable<br>"; if (file_put_contents($file, "ghijkl", FILE_APPEND) === FALSE) echo "failed<br>"; echo file_get_contents($file)."<br>";
And here is the conclusion:
abcdef is writable failed abcdef
user1484613
source share