多个数据库查看单个 php 代码库问题? [英] multiple databases looking at single php codebase issues?

查看:53
本文介绍了多个数据库查看单个 php 代码库问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 php 制作一个解决方案,并且正在考虑为不同的客户端进行多次安装.如果我有 20 个数据库,将它们指向同一个 php 代码库有什么问题吗?例如.速度问题,还是不好的做法?

I am making a solution in php and am looking at having multiple installs for different clients. If I had 20 databases, is there anything wrong with pointing them to the same php codebase? eg. speed issues, or is it bad practice?

预先感谢您的想法和专业知识:-)

Thanks in advance for your thoughts and expertise :-)

推荐答案

这是可能的,不会影响你的表现,但它有一个缺点.

It's possible and won't affect your performance but it has a downside.

如果您有一个代码库,这意味着您在更新它时必须重新检查所有客户端是否有错误.因此,您的客户端最好将代码库分开,这样您就可以为特定客户端更新代码库并防止其他客户端出错.

If you have one codebase, it means you have to recheck all clients for errors when you update it. Therefor it's better for your clients to have the codebase separated so you can update your codebase for the specific client and prevent errors on other clients.

如果对一个客户来说一切正常,您可以考虑为另一个客户进行相同的更新.

If everything seems to work for one client, you can consider the same update for another client.

如果您为每个客户端都有自定义代码,如果它是一个类似于邮件管理系统的应用程序,就会出现这种情况
这根本不是一个坏习惯.

This is the case if you have custom code for every client, if it's one application like a mailmanagement system
it wouldn't be a bad practice at all.

如果您为每个客户端分配了一个版本号,那就太好了.这使得可以在单个客户端上测试新版本,并慢慢将其他客户端迁移到新版本

It would be nice tho, if you have assigned a version number to each client. This makes it possible to test a new version on a single client, and slowly migrated other clients to a newer version

这篇关于多个数据库查看单个 php 代码库问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆