0

我似乎无法在 Arch Linux Lamp Setup 中上传和创建文件。当我检查我想要的文件夹权限时,我得到:

ls -ldh thumbnails/
drwxrwxrwx 5 ytsejam http 4.0K Jun 13 12:33 thumbnails/

我通过 php whoami() 结果检查了我的 apache 用户,结果是“http”并且 /etc/group 有这些条目

http:x:33:ytsejam
users:x:100:http
wheel:x:10:root,ytsejam.

/var/log/httpd/error_log我在access_log上看不到任何错误。这是我上传文件时的错误

ErrorException

file_put_contents(/home/ytsejam/public_html/projemiz/public/uploads/img/posts/thumbnails/213/thumb-flam1.jpg): failed to open stream: No such file or directory

当我手动创建文件夹时,我可以成功上传。这是一个权限错误,但我不知道如何修复它。有什么帮助吗?

4

1 回答 1

1

无法使用file_put_contents.

请参阅PHP,在我运行 file_put_contents() 时创建文件夹

于 2013-06-13T10:24:15.853 回答