While PHP is a programming language it is deeply mixed up with web pages and browsing and running a PHP program really means loading it into a browser.Īs long as everything is OK you should see the output of the program in another tab that opens in the editor and of course this should say "Hello PHP World". This is the URL that you would type into a browser to see the page just created.
You will be prompted to OK the launch URL which should be To run the program select Run, Run As, PHP Web page. Next save the file - if you don't you will be prompted to do so before the program is run. The PHP page that appears in the editor already contains a single line of PHP is most easily achieved by storing the Workspace files below the web server's root folder - often called www or Inetpub in the case of other installations.
The reason is that when you come to run your PHP program Eclipse will generate a URL and expect the web server to find the file and serve it to the browser.
You can opt to set up a Workspace anywhere but the simplest option is to place it within the folder structure of the web server. Start Eclipse and when it asks you to select a Workspace browse to \xampp\htdocs or to the htdocs folder where you installed XAMP.