PhpStorm无法与服务器同步 [英] PhpStorm does not sync with the server

查看:600
本文介绍了PhpStorm无法与服务器同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题出在这里:

我在phpStorm上的项目通过FTP远程访问服务器. 保存修改后的文件时,该文件通常会上传到serv,但是在serv上创建文件夹时,在phpStorm中看不到它.

My project on phpStorm use a remote access to the server by FTP. When I save a modified file, the file is uploaded normally to the serv, but when I create a folder on the serv, i don't see it in phpStorm.

有什么主意吗?

推荐答案

PhpStorm围绕本地项目文件是主要文件-部署是次要文件"的思想构建.具有自动上传到远程主机"功能(与远程本地同步)是很自然的事情.

PhpStorm is built around idea "local project files are the main ones -- deployed are secondary". It's natural to have "automatically upload to remote host" functionality (sync local with remote) to follow such idea.

同时,IDE不具有"自动自动与本地同步"(即将远程内容自动复制回本地 )的原因,因为这与以下想法相矛盾:本地文件是主要文件.

At the same time IDE does not have "automatically sync remote with local" (i.e. copy remote stuff back to local automatically) -- because it contradicts such idea: local files are the main ones.

因此:

  • 您所指的同步"按钮没有执行您期望的操作.它将IDE知道的有关项目的信息与实际的本地文件系统同步.换句话说-它检查是否在IDE之外对本地文件进行了任何更改. 它对远程文件没有任何作用.

  • The "Synchronize" button that you are referring to does not do what you are expecting it to do. It syncs what IDE knows about project with actual local file system. In other words -- it checks if there were any changes to local files done outside of IDE. It does not do anything with remote files.

要与远程文件同步,您有2个主要选项:

To sync with remote files you have 2 main options:

  1. 使用 Remote Host 侧面板(如果没有/关闭,则可以通过Tools | Deployment | Browse Remote Host进行访问)并手动下载任何文件或文件夹(可以使用拖放操作,但是确保您正在复制文件,因为默认情况下,IDE会尝试移动"(复制+删除),而不仅仅是复制").它具有刷新"按钮以重新读取远程端.

  1. Use Remote Host side panel (if not there/closed it can be accessed via Tools | Deployment | Browse Remote Host) and download any files or folders manually (drag and drop can be used, but make sure that you are copying files because by default IDE tries to "move" (copy+delete) instead of just "copy"). It has "Refresh" button to re-read remote side.

使用双向同步,方法是右键单击所需的文件夹/文件,然后选择Deployment | Synch with Deployed...,您可以在其中双向同步文件/文件夹(默认情况下,较新的内容会不论方向如何,都将覆盖优先级.)

Use two-way synchronisation accessible via right click on desired folder(s)/files and choosing Deployment | Synch with Deployed... where you can sync files/folders both ways (by default newer stuff will override older regardless of direction).

这篇关于PhpStorm无法与服务器同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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