Aptana Studio Help > Getting Started > Developing with the Aptana PHP Plugin

Previewing PHP, ASP and other non-HTML pages

This page describes how to adjust the preview tab on HTML pages to properly show content for non-HTML pages.

Contents

Requirements

You'll need a web server set up pointing to the same location where you save your files. As an example, if your project is at:

c:\Documents and Settings\username\aptana\workspace\website

and you have a local web server, make a folder from the website such that http://localhost/website and your project point to the same spot.

1. Right-click on your project in the project view. Unless you are using the very latest nightly build, there may be a bug where you need to have a '.' in your project name in order to see the "Preview Preferences" pane. Enter the URL of the local web server root where your project is based.

Image:preview_preferences_2.png

2. Save and Exit. Now when you click on the preview tab at the bottom of the page, you will see the page as rendered by your local web server. Note, you will need to save the page in the editor before any changes take effect.

Image:preview_preferences_1.png

Image:preview_preferences_3.png

Preview Inside Aptana

  1. Go to "Window -> Preferences -> Aptana -> Editors -> PHP". Change "PHP Editor Mode" to "Tabbed View".
  2. Right click your project name in the "Projects" view and go to "Properties". Select "HTML Preview". And do one of the following:
    • Apply preview settings to all projects:
      1. Click "Edit Workspace Settings". Setup the "Preview Type" to be used with your PHP server.
    • Apply preview settings to current project.
      1. Check "Override workspace settings". Setup the "Preview Type" to be used with your PHP server.

Preview Outside Aptana

  1. Go to the "Run" settings, to do this, click the arrow next to the "Run" button, click "Run..." from the dropdown menu.
  2. Duplicate the "Firefox - Internal Server" entry by right clicking it, and selecting "Duplicate".
  3. Rename the new entry to "Firefox - External Server".
  4. Change the settings for "Server" to use that of your PHP server.
  5. Click run.
  6. Now to preview outside aptana, just go to the "Run" dropdown and select "Firefox - External Server".

Related Topics