有没有办法为 PHP 中的每个人包含一个文件?

发布于 2024-10-01 04:53:07 字数 205 浏览 3 评论 0原文

我在服务器上设置了一堆虚拟主机,我想要一种通用的包含文件夹,它们都可以从中包含。在 php.ini 中,include_path 和 open_basedir 都包含文件夹的路径。该包含文件位于与所有站点相同的路径中,我什至尝试将权限设置为 777 并将文件与每个人放在同一组中,但 PHP 拒绝包含,除非它们具有相同的所有者。有什么方法可以解决此问题并让它们包含在该文件夹中,而不管所有者是谁?

I have a bunch of vhosts set up on a server and I want a sort of universal include folder that they can all include from. In the php.ini the include_path and open_basedir both include the path to the folder. The include is located in the same path as all the sites and I've even tried setting permissions to 777 and put the files in the same group as everyone, but PHP refuses to include unless they have the same owner. Is there any way to get around this issue and let them include from that folder regardless of the owner?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月染过的梦 2024-10-08 04:53:07

您可以包含远程文件,请阅读:http://php.net/manual/ en/features.remote-files.php

You can include remote files, read this: http://php.net/manual/en/features.remote-files.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文