在 Eclipse 中创建新的 PHP 项目(现有源)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8504720/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:26:40  来源:igfitidea点击:

Create new PHP project in Eclipse (existing sources)

phpeclipse

提问by Rooneyl

I have a PHP project sat on a remote server.

我在远程服务器上有一个 PHP 项目。

Can I create a new project in Eclipse by downloading the sources from the remote server.

我可以通过从远程服务器下载源代码在 Eclipse 中创建一个新项目吗?

If so, some instructions on how to do so please.

如果是这样,请提供有关如何操作的说明。

采纳答案by Justin T.

There is no direct way to do that, at least with standard installof Eclipse PHP

没有直接的方法可以做到这一点,至少标准安装Eclipse PHP

You would usually use "File > Import..."or "File > New Project > PHP Project..."menus for that, but I have never seen this option anywhere in Eclipse.

您通常会为此使用“文件 > 导入...”“文件 > 新建项目 > PHP 项目...”菜单,但我从未在 Eclipse 中的任何地方看到过这个选项。

So this is one of three solutions :

所以这是三个解决方案之一:

  • get a local copy of the php code
  • import from source repository (e.g SVN, CVS, Git). (you do use one of these for your project, do you ?)
  • switch to another IDE, NetBeans, which support "PHP Application from Remote Server", while being lighter IMHO.
  • 获取 php 代码的本地副本
  • 从源存储库(例如 SVN、CVS、Git)导入。(您确实在项目中使用了其中之一,是吗?)
  • 切换到另一个 IDE NetBeans,它支持“来自远程服务器的 PHP 应用程序”,而恕我直言更轻。

回答by Kirk

It depends on the type of source control software. You can install git, svn or cvs modules. The steps to take are:

这取决于源代码控制软件的类型。您可以安装 git、svn 或 cvs 模块。采取的步骤是:

  1. Install module for git, svn or cvs
  2. Create new {git|svn|cvs} project, enter the server information
  3. Then it takes you to what kind of project to create, so create a PHP project. (This assumes that there isn't an eclipse project already submitted to version control.)
  1. 为 git、svn 或 cvs 安装模块
  2. 新建{git|svn|cvs}项目,输入服务器信息
  3. 然后带你去创建什么样的项目,所以创建一个PHP项目。(这假设没有已经提交给版本控制的 eclipse 项目。)

回答by Swatantra Kumar

You can do the same, by fooling the local system.

你可以通过欺骗本地系统来做同样的事情。

  • Create a Network Location drive
  • Go on your desktop Right click > Add a Network Location
  • Choose a custom Network Location
  • Pass a Internet IP or network Location
  • 创建网络位置驱动器
  • 转到您的桌面右键单击 > 添加网络位置
  • 选择自定义网络位置
  • 传递 Internet IP 或网络位置

e.g.

例如

\server\share (shared folder)
http://swatantra.info/share (Web Share)
ftp://ftp.swatantra.info (FTP site)
  • Now it is similar to your normal local drive mapped as (Z:\ or so)
  • Go on with your normal project creation stuff
  • 现在它类似于映射为 (Z:\ 左右) 的普通本地驱动器
  • 继续你正常的项目创建工作

回答by dimitrisli

Not that I am aware of. Even when you remote debug you would still need a copy of the sources locally.

不是我所知道的。即使在远程调试时,您仍然需要本地源的副本。