failed to open stream: Permission denied file_get_contents which generates XML FILE

后端 未结 3 1296
你的背包
你的背包 2020-12-19 21:56

I am trying to generating an XML file, but error come in this file_get_contents() PHP function, this is my code:

 function mobile_login1($P1, $P2)
{
    $url         


        
相关标签:
3条回答
  • 2020-12-19 22:35

    I had the same problem, as suggested above, the following worked for me on Centos 7

    setsebool -P httpd_can_network_connect on
    
    0 讨论(0)
  • 2020-12-19 22:42

    I had the same problem on a self-configured CentOS6 host with LAMP + Wordpress. The Wordpress wp_remote_get() function did not return results (and didn't return an error) nor did PHP file_get_contents(). Executing this on the host solved the issue.

    setsebool -P httpd_can_network_connect on
    
    0 讨论(0)
  • 2020-12-19 22:48

    it turns out it was a problem with on my server:

    I ran this line from the terminal to reslove it

    setsebool -P httpd_can_network_connect on
    

    thanks for the suggestion guys

    0 讨论(0)
提交回复
热议问题