有没有办法为 PHP 中的每个人包含一个文件?
我在服务器上设置了一堆虚拟主机,我想要一种通用的包含文件夹,它们都可以从中包含。在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以包含远程文件,请阅读: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