file_put_contents - failed to open stream: Permission denied

前端 未结 14 1658
耶瑟儿~
耶瑟儿~ 2020-11-27 03:05

I am trying to write a query to a file for debugging. The file is in database/execute.php. The file I want to write to is database/queries.php.

14条回答
  •  遥遥无期
    2020-11-27 03:51

    had the same problem; my issue was selinux was set to enforcing.

    I kept getting the "failed to open stream: Permission denied" error even after chmoding to 777 and making sure all parent folders had execute permissions for the apache user. Turns out my issue was that selinux was set to enforcing (I'm on centos7), this is a devbox so I turned it off.

提交回复
热议问题