在多个 Web 服务器上同步 php 文件

发布于 2024-12-27 15:53:21 字数 90 浏览 2 评论 0原文

我有 2 个网络服务器,每次需要更改某些内容时,我都需要在两个网络服务器上编辑文件。在多个 Web 服务器上同步 php 文件的最佳方法是什么?

谢谢

I have 2 web servers and I need to edit files on both web servers every time i need to change something. What is the best way to sync the php files on multiple web servers?

Thank you

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

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

发布评论

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

评论(4

澜川若宁 2025-01-03 15:53:21

源代码版本控制。我建议阅读 subversion 或 git。老实说,如果没有某种版本控制系统,您确实不应该进行编程。

Source code version control. I would suggest reading up on either subversion or git. In all honesty, you really shouldn't be programming without some sort of version control system.

窗影残 2025-01-03 15:53:21

我已经开始使用 Mercurial 和这个 FTP 插件。效果相当不错。它也支持多个目标:)

I've started to use Mercurial and this FTP plugin. Works pretty good. It supports multiple targets as well :)

谁把谁当真 2025-01-03 15:53:21

版本控制是一件好事,如果您使用 git,您可以将 2 个网络服务器添加为远程服务器并将它们推送到本地早午餐。

您可以使用的另一个是 Netbeans 中的构建功能,首先您可以将 smb 或 nfs 路径映射到本地文件系统。比在netbeans属性中更改远程运行模式并将第二个服务器添加为php并选择“保存时上传”,因此每次保存直接在服务器1中编辑的文件并自动上传到服务器2

Version control is one good thing, if you use git you can add the 2 webservers as remotes and push them at your local brunch.

The other one you can use is the build on functionality in Netbeans, first you can map an smb or nfs path to your local filesystem. than in netbeans properties change run mode in remote and add the second server as php and choose "upload on save" so everytime you save the file you edit directly within server 1 and upload automaticly to server 2

扮仙女 2025-01-03 15:53:21

我的朋友,你必须使用 Lsync 在多个 Web 服务器之间同步文件。在 google 中搜索 Lsync 然后你就可以了

My friend, you got to use Lsync which synchronizes files between multiple web servers. Search google for Lsync and you sh

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