简体   繁体   English

PhpStorm ftp无需下载所有文件

[英]PhpStorm ftp without downloading all files

I just switched to the php editor PhpStorm. 我刚刚切换到php编辑器PhpStorm。 With other editors I have used, editing files through ftp went like this: 使用我使用的其他编辑器,通过ftp编辑文件是这样的:

  1. Browse the file in the explorer 浏览资源管理器中的文件
  2. Open the file in the editor 在编辑器中打开文件
  3. Make changes 做出改变
  4. Press save 按保存

This would automatically first download that single file and show it in the editor, and then upload that file to the server with the changes. 这将自动首先下载该单个文件并在编辑器中显示,然后将该文件上载到具有更改的服务器。

Now I'm trying to add an ftp connection in PhpStorm, but it immediately downloads all files to my pc. 现在我正在尝试在PhpStorm中添加一个ftp连接,但它会立即将所有文件下载到我的电脑上。 Is there a way to have the workflow I just described on PhpStorm, without downloading the whole server. 有没有办法让我刚刚在PhpStorm上描述的工作流程,而无需下载整个服务器。

There is uncompleted answer for that, 还有未完成的答案,

File > New Project from Existing file ... > web server ... via FTP/SFTP/FTPS.

Than fill the forms to the end, The local project on the left will be empty. 比填写表格到最后,左边的本地项目将为空。

chose Tools > Deployment > Browse Remote Host. 选择Tools > Deployment > Browse Remote Host.

This will show the Host files and folders on the right. 这将在右侧显示主机文件和文件夹。

Double click to open the file and Alt+Shift+Q to upload it. Double click打开文件, Alt+Shift+Q上传文件。

Why uncompleted answer? 为什么未完成答案? Because when you open multi files and edit some, you will not know which are edited and not uploaded from the unedited files. 因为当您打开多个文件并编辑某些文件时,您将无法知道哪些文件已编辑且未从未编辑的文件上载。

-Phpstorm 2016.3.2 -Phpstorm 2016.3.2

Add a File > New Project from Existing file ... > web server ... via FTP/SFTP/FTPS. File > New Project from Existing file ... > web server ... via FTP/SFTP/FTPS.添加File > New Project from Existing file ... > web server ... via FTP/SFTP/FTPS. .
In the last screen, where you set the project root, select the correct folder as project root and also select it as exclude from download 在最后一个设置项目根目录的屏幕中,选择正确的文件夹作为项目根目录, 并将其选择为exclude from download

Save your project and you're good to go. 保存你的项目,你很高兴。 No download happens. 没有下载。

Please refer my tutorial which explains how to access remote files using ftp . 请参阅我的教程,该教程解释了如何使用ftp访问远程文件。 We can edit the files and automatically upload the files to the server on save. 我们可以编辑文件并在保存时自动将文件上传到服务器。

http://www.pearlbells.co.uk/edit-remote-files-phpstorm/ http://www.pearlbells.co.uk/edit-remote-files-phpstorm/

Main steps : 主要步骤:

  • Select File->New project from Existing files 从现有文件中选择文件 - >新项目
  • Select the checkbox as shown in fig (refer blog for images) and click next. 选中图中所示的复选框(参考图片博客),然后单击下一步。
  • Enter projectname 输入projectname
  • From the dropdown select 'On explicit save atcion' 从下拉列表中选择“On explicit save atcion”
  • Add new remote server 添加新的远程服务器
  • Enter Ftp details 输入Ftp详细信息
  • Select the remote path. 选择远程路径。

Refer the tutorial for demo images and explanation. 请参阅教程以获取演示图像和说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM