配置Eclipse以在工作空间外添加buildpath文件夹

时间:2021-08-10 21:29:45

I'm developing PHP on a mac. As per other suggestions, I've set the workspace to be in the HTDOCS folder of MAMP.

我在mac上开发PHP。根据其他建议,我将工作区设置为MAMP的HTDOCS文件夹。

Unfortunately, this means I cannot use links to '/' as I would in production. Any suggestions?

不幸的是,这意味着我不能像生产中那样使用“/”链接。有什么建议?

Relatedly, the workspace seems to prevent references to build paths outside the workspace, yet I would Like to keep my sensitive files outside the base workspace folder. Is there a way to do this?

相关地,工作空间似乎阻止了在工作空间之外构建路径的引用,但我想将我的敏感文件保留在基础工作区文件夹之外。有没有办法做到这一点?

2 个解决方案

#1


2  

I usually use the "link" feature:

我通常使用“链接”功能:

  • select folder in which you want to create the link (i.e. root itself);
  • 选择要在其中创建链接的文件夹(即root本身);

  • right-click -> new -> Folder
  • 右键单击 - >新建 - >文件夹

  • click "Advanced" button
  • 单击“高级”按钮

  • check "Link to folder in the filesystem" and browse for the folder under htdocs
  • 选中“链接到文件系统中的文件夹”并浏览htdocs下的文件夹

This should help

这应该有所帮助

#2


1  

I have no experience using eclipse with PHP, but for Java, you can "Add External Class Folder" in the "Libraries" tab of the Build Path dialog. Generally, anything that's outside the workspace is called "external" and accessible only through such special options.

我没有使用eclipse和PHP的经验,但对于Java,您可以在Build Path对话框的“Libraries”选项卡中“添加外部类文件夹”。通常,工作区外的任何内容都称为“外部”,只能通过此类特殊选项访问。

#1


2  

I usually use the "link" feature:

我通常使用“链接”功能:

  • select folder in which you want to create the link (i.e. root itself);
  • 选择要在其中创建链接的文件夹(即root本身);

  • right-click -> new -> Folder
  • 右键单击 - >新建 - >文件夹

  • click "Advanced" button
  • 单击“高级”按钮

  • check "Link to folder in the filesystem" and browse for the folder under htdocs
  • 选中“链接到文件系统中的文件夹”并浏览htdocs下的文件夹

This should help

这应该有所帮助

#2


1  

I have no experience using eclipse with PHP, but for Java, you can "Add External Class Folder" in the "Libraries" tab of the Build Path dialog. Generally, anything that's outside the workspace is called "external" and accessible only through such special options.

我没有使用eclipse和PHP的经验,但对于Java,您可以在Build Path对话框的“Libraries”选项卡中“添加外部类文件夹”。通常,工作区外的任何内容都称为“外部”,只能通过此类特殊选项访问。