文件夹重定向 PHP

发布于 2024-09-24 05:49:41 字数 313 浏览 0 评论 0原文

好吧,我想做的是从一个文件夹中提取多个文件夹。因此,如果我有这样的结构:

/test1/some_folder
/test2/some_folder
/test3/some_folder

我希望所有名为 some_folder 的文件夹都从主目录中读取。我不需要它们能够访问该特定的网址,只需要它在每个网址中包含主目录中的文件即可。想象一下,我正在设置共享功能,只想将它们存储在一个地方,但能够将它们包含在任何网站上。我不知道要谷歌什么(尝试过文件夹重定向,但似乎不正确),因此如果有人可以提供有关谷歌什么的建议或想要提供答案,我们将不胜感激。

Ok so what I am trying to do is have multiple folders pull from one folder. So if I have this structure:

/test1/some_folder
/test2/some_folder
/test3/some_folder

I would want all of those folders named some_folder to read from a master directory. I dont need them to be able to go that specific url just need it to include the files from the main directory in each of those. Imagine I was setting up shared functions and just wanted to store them in one place but be able to include them on any site. I didnt know what to google (tried folder redirection but didnt seem right) so if anyone can offer a suggestion as to what to google or wants to provide an answer it would be appreciated.

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

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

发布评论

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

评论(2

一百个冬季 2024-10-01 05:49:41

将它们全部添加到 include_path

另请参阅: set_include_path()

Add all of them to include_path

See also: set_include_path()

旧伤慢歌 2024-10-01 05:49:41

如果可能的话,最好的选择就是使用符号链接。甚至大多数版本控制包都理解这些。请务必设置 FollowSymlinks对于 Apache 来说是正确的。

If it's possible, your best bet is just using a symlink. Even most version control packages understand those. Be sure to set FollowSymlinks to true for Apache.

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