gpt4 book ai didi

php - file_put_contents 说权限被拒绝?

转载 作者:可可西里 更新时间:2023-11-01 12:34:31 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
file_put_contents permission denied

我最近换了服务器,好像file_put_contents在新服务器上不工作了。

一切都一样,文件夹被正确修改,但由于某种原因它没有创建文件并将内容放入其中。

我创建了一个测试供您查看,模拟我们目前的做法:

file_put_contents("/home/user/public_html/test/test.progress", "test");

脚本运行于

/home/user/public_html/test.php

/test folder is chmodded to 755 (777 makes no difference)

我收到以下错误:

Warning: file_put_contents(/home/user/public_html/test/test.progress) [function.file-put-contents]: failed to open stream: Permission denied in /home/user/public_html/test.php on line 2

我是否需要更改服务器上的任何设置才能使其正常工作?怎么了?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com