Anyone have any ideas on this? I check the file with file_exists()and is_writable(), both of which return true. I set the directory and the file in 777only to be safe, but try fwrite () or file_put_contents () do not change the file
file_exists()
is_writable()
777
Here is the relevant code:
$filePath = dirname( __FILE__ ) . '/' . 'myfile.txt'; file_put_contents($filePath, "waffles are delicious");
You have noted access rights to the file, but you can also familiarize yourself with its ownership.
, uid/gid . , zip tar.gz , CMS , , , FTP.
, chown , / . , , root/su.
chown
chown -R username:groupname *
-R , .
-R
php, , .