PHP IDE 将更改的文件上传到远程 FTP
我在远程服务器上有项目,并在本地主机上有一个副本。每天,当工作完成后,我都会使用 Dreamveawer 的同步功能将项目从本地主机上传到远程服务器。它定义创建/更新/删除哪些文件并在远程主机上更新它们。
今天我将Dreamveawer更改为更舒适的PHP IDE(phpDesigner),但有一个问题,没有功能仅将更改的文件上传到远程FTP服务器。
我该怎么做?也许需要 SVN 或其他东西的帮助?
PS 在开发机器上我使用 Windows,在远程主机上 - *nix
I have project on the remote server and a copy of it on my localhost. Each day, when work is done I'm uploading project from localhost to remote server using Dreamveawer's sync function. It defines which files where creared/updated/deleted and updates them on the remote host.
Today I've changed Dreamveawer to more comfortable PHP IDE (phpDesigner) and there is a problem, there is no function to upload only changed files to the remote FTP server.
How can I do this? Maybe with the help of SVN or something else?
P.S. On development machine I use Windows, on remote host - *nix
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我可以建议一种不同的方法吗?它本身并不完全自动同步您的内容,但它是全面保持所有内容完整的好方法。将有助于解决在任一方向覆盖某些内容的问题。它还会给你一个历史记录,让你在编码数小时后出现问题时可以恢复到原来的状态,结果却发现你只是把事情弄得一团糟……
我的建议是像 Git,特别是 GitHub 之类的东西。当然,GitHub 具有开源心态,因此您发布的任何内容都将公开可用,除非您愿意付费购买私人帐户。另一方面,可以选择在托管服务器上设置您自己的个人私有 git 服务器(如果您有此类权限),甚至可以在本地备用驱动器上设置。虽然设置 git 有时有点麻烦,具体取决于你走哪条路。还有 SVN (Subversion) 相同的概念,不同的做法。
在我的书中,这两点都是好主意。这么多优点。我相信 GitHub 上也有脚本或 API,如果您的主机允许,您可以使用它们在托管服务器上再次运行类似 cronjob 之类的东西。你可以每天、每周、每 12 小时跑步一次吗?任何。可以检查是否有任何新内容,如果有则应用它。
如果你可以使用 rsync 选项,我会支持它。但是根据您所拥有的操作系统在本地计算机上进行设置本身可能很棘手。否则,您可以购买一些商业产品,它们能够在您的项目目录和远程目录上运行,您可以购买这些产品,其行为类似于 FTP。我相信在大多数情况下这些都需要 SSH。
就我个人而言,我曾经尝试过一些声称可以同步的 FTP 程序,也尝试过使用 DreamWeaver 的功能。但我不喜欢它们;在大多数情况下,它们引起的头痛超出了其应有的程度。总而言之,我个人会选择 git 或 svn 路线。
Might I suggest a different approach? It's not exactly syncing your stuff automatically per se, but it is a good method of keeping everything kosher across the board. Would help with the issue of overwriting something in either direction. It will also give you a history to revert back to should something go wrong after hours of coding, only to find out you just made a mess...
My suggestion would be something like Git, GitHub in particular. Of course GitHub has a open source mentality so anything you put up there will be publicly available unless you are willing to pay for a private account. On the flip side, there is the option to setup your own personal private git server either on your hosting server if you have those type of privileges or even locally on a spare drive. Though setting up git is kinda hairy sometimes depending on which route you go. There's also SVN (Subversion) same concept, different style of doing it.
All around both are good ideas in my book. So many pluses. I believe also there are scripts or APIs with GitHub that you can use to run through something like a cronjob on your hosting server again if your host allows it. that you can just have run every day, week, every 12 hours? whatever. that can check to see if there's anything new, and if so apply it.
I am for that rsync option if you have it accessible. But setting it up on your local machine depending on what OS you have might be tricky in itself. Otherwise, there are some commercial products you could purchase that have the ability to run over your project directory and remote directory that you could purchase and act similar to an FTP. These require SSH I believe though in most cases.
Personally I have tried a few FTP programs in my time that claim syncing, have also attempting to use DreamWeaver's ability. But I don't like them; they cause more headaches than they were worth in most cases. All in all, I would go the git or svn route personally.
你的主机支持rsync吗?这样就可以很好地达到目的。您还需要开发机器上的支持;这在 Mac 和 Linux 上很容易使用,并且可以在 Windows 上进行一些修改(后者搜索 cwRsync)。
如果您的主机上未开放该选项,请至少切换到 SFTP(如果提供)。它比 FTP 更安全,因为密码/数据不是以纯文本形式发送的。
编辑:是的,你可以用 Subversion 来做到这一点 - 你知道主机支持 svn 命令吗?
Does your host support rsync? That would do the trick very nicely. You also need support on your development machine; this is easily available on Mac and Linux, and can be had on Windows with some fiddling (search for cwRsync for the latter).
If that option is not open to you on your host, do at least switch to SFTP if it is offered. It is more secure than FTP, since the password/data is not sent in plain text.
Edit: yes, you can do this with Subversion - do you know that the host supports the
svn
command?Netbeans 在同步方面做得很好
这是如何设置的
https://blogs.oracle.com/netbeansphp/entry/remote_synchronization
netbeans does a great job about sync
here is how to set up this
https://blogs.oracle.com/netbeansphp/entry/remote_synchronization