php file_put_contents function not working

前端 未结 5 1696
一整个雨季
一整个雨季 2020-12-10 10:51

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         


        
5条回答
  •  再見小時候
    2020-12-10 11:18

    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.

提交回复
热议问题