【发布时间】:2019-03-07 22:23:46
【问题描述】:
<?php
file_put_contents('demo.txt', "You can put\rAny text here");
从浏览器执行 PHP 文件时不创建 demo.txt 文件。 VMware 上的虚拟服务器。任何帮助,将不胜感激。
【问题讨论】:
-
检查你的日志,有没有错误?
-
这几乎总是一个权限问题
标签: php
<?php
file_put_contents('demo.txt', "You can put\rAny text here");
从浏览器执行 PHP 文件时不创建 demo.txt 文件。 VMware 上的虚拟服务器。任何帮助,将不胜感激。
【问题讨论】:
标签: php
可能是权限问题。为您尝试创建文件的文件夹授予 777 权限
chmod 777 foldername.
但是 777 可能并不像专家所说的那样安全。但目前它可以为您提供帮助。
【讨论】: