站点之间共享后端 - 最佳方法
我有一个 php 后端,可供我控制的服务器上的多个站点使用。现在,让每个站点从 1 个共享后端运行的最佳方法是什么,而不是在每个 Web 根目录中都有一个单独的副本? (方便后台更新等)
I have a php backend which is to be used by multiple sites on a server I control. Now rather than having an individual copy in each web root, what is the best method to have each site work from 1 shared backend? (For easy updating of the backend, etc)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
站点和后端通过数据库连接。后端和所有站点位于何处并不重要,只要它们都连接到同一数据库,它们就共享相同的信息。
The site and backend are connected through the database. It doesn't matter where the backend and all your sites are located, as long as they all connect to the same database, they share the same information.
保留一份所有站点共用的核心文件的副本。让所有站点都链接到核心文件。非核心文件可以驻留在其自己的站点文件夹中。 \
keep one copy of the core files that are common across all the sites. have all the sites link up to the core files. the non-core files can reside in its own sites folder. \