Since making my transition from Adobe Dreamweaver to Aptana Studio, i have never looked back as it has over time becomes my favourite IDE.
As with most full-blown IDE, Aptana studio also has the ability to preview server-side scripting language such as PHP without you having to use your web browser. Before your PHP code can be interpreted and rendered appropriately, you need a web server such as XAMPP installed and running on your computer.
Take note, the default document root for XAMPP varies with your PC “operating system”;
- Windows: \xampp\htdocs
- Linux: /opt/lampp/htdocs/
- OS X: /Applications/XAMPP/htdocs/
Setting up of the XAMPP powered PHP web server on Aptana Studio is done while creating a Project. Want to learn how it is done? Follow the steps below.
- Firstly, we need to create a new project named My test Project by clicking on “File menu”, select New > PHP Project (or Web Project).
- Type a name for your project (My test Project), Uncheck the Use default location box and browse to the htdocs (or equivalent) folder in your server installation directory.
- Continue to choose a project template, or Click the Finish button
Now you have successfully set up the XAMPP PHP web server for Aptana. To see if it is working, let’s create a demo.php file with a “Hello World” statement.
<?php echo "hello world"; ?>
Click the Preview icon circled in the image below to see the how the code renders in a web browser.
Note: make sure XAMPP is up and running else the demo preview won’t work.