服务器上file_put_contents写入文件失败

WBOY
Release: 2016-06-23 14:01:47
Original
1647 people have browsed it


写入的文件为

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


语句为

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


这是咋回事???


回复讨论(解决方案)

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

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

chmod 777 path

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

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template