Why would file_put_contents refuse to work for the following code?
$f = file_put_contents(\"files/r.js\", \"Some text here\"); if ($f) print 1; else print 0
We've experienced this, requiring a workaround (regardless of method, permissions and anything else mentioned here). When all other fixes failed, we have found it can be linked to restrictions created by SELinux.