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.
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.
Preview Inside Aptana
- Go to "Window -> Preferences -> Aptana -> Editors -> PHP". Change "PHP Editor Mode" to "Tabbed View".
- 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:
- Click "Edit Workspace Settings". Setup the "Preview Type" to be used with your PHP server.
- Apply preview settings to current project.
- Check "Override workspace settings". Setup the "Preview Type" to be used with your PHP server.
- Apply preview settings to all projects:
Preview Outside Aptana
- Go to the "Run" settings, to do this, click the arrow next to the "Run" button, click "Run..." from the dropdown menu.
- Duplicate the "Firefox - Internal Server" entry by right clicking it, and selecting "Duplicate".
- Rename the new entry to "Firefox - External Server".
- Change the settings for "Server" to use that of your PHP server.
- Click run.
- Now to preview outside aptana, just go to the "Run" dropdown and select "Firefox - External Server".