Failed to open stream on file_put_contents in PHP on CentOS 7

前端 未结 2 1287
天命终不由人
天命终不由人 2021-02-10 11:39

I know this is a common bug with many threads but I\'m tired of searching and I still haven\'t solved it. When I try to run the function file_put_contents I get

2条回答
  •  日久生厌
    2021-02-10 12:02

    chcon -Rv --type=httpd_sys_rw_content_t /dir
    

    This may help,rather than turn off the selinux.

提交回复
热议问题