I'm using Eclipse PHP Development Tools. What would be the easiest way to access a file or maybe create a remote project trough FTP and maybe SSH and SFTP?.
6 回答
Eclipse natively supports FTP and SSH. Aptana is not necessary.
Native FTP and SSH support in Eclipse is in the "Remote System Explorer End-User Runtime" Plugin.
Install it through Eclipse itself. These instructions may vary slightly with your version of Eclipse:
- Go to 'Help' -> 'Install New Software' (in older Eclipses, this is called something a bit different)
- In the 'Work with:' drop-down, select your version's plugin release site. Example: for Kepler, this is
Kepler - http://download.eclipse.org/releases/kepler - In the filter field, type 'remote'.
- Check the box next to 'Remote System Explorer End-User Runtime'
- Click 'Next', and accept the terms. It should now download and install.
- After install, Eclipse may want to restart.
Using it, in Eclipse:
- Window -> Open Perspective -> (perhaps select 'Other') -> Remote System Explorer
- File -> New -> Other -> Remote System Explorer (folder) -> Connection (or type Connection into the filter field)
- Choose FTP from the 'Select Remote System Type' panel.
- Fill in your FTP host info in the next panel (username and password come later).
- In the Remote Systems panel, right-click the hostname and click 'connect'.
- Enter username + password and you're good!
- Well, not exactly 'good'. The RSE system is fairly unusual, but you're connected.
- And you're one smart cookie! You'll figure out the rest.
Edit: To change the default port, follow the instructions on this page: http://ikool.wordpress.com/2008/07/25/tips-to-access-ftpssh-on-different-ports-using-eclipse-rse/
Install Aptana plugin to your Eclipse installation.
It has built-in FTP support, and it works excellently.
You can:
- Edit files directly from the FTP server
- Perform file/folder management (copy, delete, move, rename, etc.)
- Upload/download files to/from FTP server
- Synchronize local files with FTP server. You can make several profiles (actually projects) for this so you won't have to reinput over and over again.
As a matter of fact the FTP support is so good I'm using Aptana (or Eclipse + Aptana) now for all my FTP needs. Plus I get syntax highlighting/whatever coding support there is. Granted, Eclipse is not the speediest app to launch, but it doesn't bug me so much.
have you checked RSE (Remote System Explorer) ? I think it's pretty close to what you want to achieve.
I'm not sure if this works for you, but when I do small solo PHP projects with Eclipse, the first thing I set up is an Ant script for deploying the project to a remote testing environment. I code away locally, and whenever I want to test it, I just hit the shortcut which updates the remote site.
Eclipse has good Ant support out of the box, and the scripts aren't hard to make.
SFTP Plug-in: http://www.jcraft.com/eclipse-sftp/ :)
As none of the other solutions mentioned satisfied me, I wrote a script that uses WinSCP to sync local directories in a project to a FTP(S)/SFTP/SCP Server when eclipse's autobuild feature is triggered. Obviously, this is a Windows-only solution.
Maybe someone finds this useful: http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/