Home >Backend Development >PHP Tutorial >服务器上file_put_contents写入文件失败

服务器上file_put_contents写入文件失败

WBOY
WBOYOriginal
2016-06-23 14:01:471654browse


写入的文件为

-rwxr-xr-x. 1 root root 15061 Feb 21 00:07 student.css


语句为

$cont = str_replace('/Public/Images', __APP__ . '/Public/Images', $content);echo $cont;  // 此为修改过后的内容var_dump(file_put_contents($dv, $cont)); // 返回bool(false)exit;


这是咋回事???


回复讨论(解决方案)

你不是看到没有权限了吗?

你是root用户吗?其他用户是没有写的权限的

chmod 777 path

之前也是这样的,有些文件也写进去了,有的文件没写进去了

Statement:
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