php 在 Aptana Studio 3 中添加外部服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5968156/
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-08-25 23:04:07  来源:igfitidea点击:

Adding an external server in Aptana Studio 3

phpapachewindows-xpaptana

提问by Carlos Torres

How can I add an external server in Aptana Studio 3, since there is no Servers view?

由于没有服务器视图,如何在 Aptana Studio 3 中添加外部服务器?

Herearesome instructions on how to do it but they both use Windows > Show view > Servers which is no longer available in Aptana 3. With the console is possible? How?

以下有关如何执行此操作一些说明,但它们都使用 Aptana 3 中不再可用的 Windows > Show view > Servers。是否可以使用控制台?如何?

I have a wamp server installed and I can run correctly php files stored inside the htdocs folder. Now I want to run those php files from Aptana but I was getting blank pages.

我安装了 wamp 服务器,我可以正确运行存储在 htdocs 文件夹中的 php 文件。现在我想从 Aptana 运行那些 php 文件,但我得到了空白页。

In Project > Run Configurations I noticed the "Use selected server" option but no possibilty to add a server there, so I used "Use base URL" together with "Append project name" and now I can run php files from Aptana but I am still wondering if it is the best option and how I could tell Aptana to use the wamp server.

在项目 > 运行配置中,我注意到“使用选定的服务器”选项,但无法在那里添加服务器,因此我将“使用基本 URL”与“附加项目名称”一起使用,现在我可以从 Aptana 运行 php 文件,但我是仍然想知道它是否是最好的选择,以及我如何告诉 Aptana 使用 wamp 服务器。

adding a server in Aptana Studio 3

在 Aptana Studio 3 中添加服务器

回答by Max

In Aptana Studio 3 you need to open Preferences, Aptana/ Web Servers node and add your local apache server there. If you set the document root correctly, your apache server will be used for previewing in Studio (See Preview button on toolbar).

在 Aptana Studio 3 中,您需要打开 Preferences、Aptana/Web Servers 节点并在那里添加您的本地 apache 服务器。如果您正确设置了文档根目录,您的 apache 服务器将用于在 Studio 中进行预览(请参阅工具栏上的预览按钮)。

回答by user2838656

Just add an alias in my apache config like

只需在我的 apache 配置中添加一个别名,例如

Alias /aptana "C:/Aptana/Aptana Studio 3 Workspace"

where I have MyApp project in Aptana,

我在 Aptana 中有 MyApp 项目的地方,

Then in Run cnfiguration, Web Browser, My Apache Server,

然后在运行配置、Web 浏览器、我的 Apache 服务器中,

Use base url = http://<domain><port>/aptana/

In my browser URL : http:///aptana/MyApp

在我的浏览器 URL 中:http:///aptana/MyApp

That's all

就这样

回答by CodingMonkey

I solved it by following method:

我通过以下方法解决了它:

1.find the httpd.conf in {path to Apache}/conf/, set the "DocumentRoot" value as your Aptana workspace.

1. 在 {path to Apache}/conf/ 中找到 httpd.conf,将“DocumentRoot”值设置为您的 Aptana 工作区。

2.Run->Run Configurations.. choose a web browser, set the "Use base URL" value as http://localhost/{here is your project name}/

2.Run->Run Configurations.. 选择一个网络浏览器,将“Use base URL”值设置为 http:/// localhost{here is your project name}/

3.run.

3.运行。