文件夹重定向 PHP
好吧,我想做的是从一个文件夹中提取多个文件夹。因此,如果我有这样的结构:
/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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将它们全部添加到 include_path
另请参阅: set_include_path()
Add all of them to include_path
See also: set_include_path()
如果可能的话,最好的选择就是使用符号链接。甚至大多数版本控制包都理解这些。请务必设置
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.