Home > php教程 > php手册 > file_get_contents

file_get_contents

WBOY
Release: 2016-06-07 11:37:57
Original
1396 people have browsed it

file_get_contents读取网络上的图片文件并由file_put_contesnts写入到服务器本地无法写入问题
默认下selinux是开启的<br> 查看SELinux状态:<br> 1、/usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态<br> SELinux status:                 enabled<br> 2、getenforce                 ##也可以用这个命令检查<br> 关闭SELinux:<br> 1、临时关闭(不用重启机器):<br> setenforce 0                  ##设置SELinux 成为permissive模式<br>                               ##setenforce 1 设置SELinux 成为enforcing模式<br> 2、修改配置文件需要重启机器:<br> 修改/etc/selinux/config 文件<br> 将SELINUX=enforcing改为SELINUX=disabled<br> 重启机器即可<br> <br> 另外,如果以上还是不能解决的话要设置一下目录的权限策略<br> chcon -R -t httpd_sys_content_t /home/html

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template