Php – Create Hello World Project with Eclipse

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/php-create-hello-world-project-eclipse/
PINTEREST
PINTEREST
INSTAGRAM

PHP Tutorial Topics

  1. Introduction To PHP
  2. Installing PHP To Linux
  3. Installing PHP To Windows
  4. PHP Hello World Project with Eclipse
  5. PHP Syntax
  6. PHP Variables and Types
  7. PHP String Types
  8. PHP Numeric Type (Integer, Float, Double)
  9. PHP Boolean Type
  10. PHP Arrays
  11. PHP Operators
  12. PHP Ternary Operators
  13. PHP Constants
  14. PHP If..Elseif..Else Conditional Statements
  15. PHP Switch..Case Conditional Statements
  16. PHP For and Foreach Loop Statements
  17. PHP While and Do While Statements
  18. PHP Functions
  19. PHP Class and Objects
  20. PHP Date and Time Operations

While developing Php applications using IDE will provide a lot of useful feature.

Create Hello World Project

We have installed required software properly in previous steps. As a first step we will run Eclipse . We can start eclipse in different ways. In this situation we prefer starting it from Program menu like below.

Another ways to start eclipse is running eclipse command in the terminal like below.

We will see Eclipse Launcher where we will set projects home directory.

We click OK and resume

Create Php Project

We will create a Php project in eclipse IDE with the following screen. We will click File -> New -> Project

Create Php Project

Create Php Project

Then we will see following screen where we select PHP Project

Then we will set name of the project and click Finish . We can also select Next where we will specify detailed options of the Php project. In this form we can see that project path where it will be stored.

Simply click Yes to setup screen properly for Php project

LEARN MORE  What is Microsoft Powershell ? How Can I Automate Tasks?

Add New Php File

We have created our project named Hello World . We need to add some file to the project. We right click on our project on the project pane and select New -> PHP File

Add New Php File

Add New Php File

We will set the file name as index.php which is default most of the Php projects.

Add New Php File

Add New Php File

Configure Php Interpreter and Executable

We need to configure the Php interpreter to run applications in Eclipse. We will click the Eclipse main menu Window -> Preferences and get following screen. From Here we will select Php Executable and click Add

Configure Php Interpreter and Executable

Configure Php Interpreter and Executable

We will set new interpreter’s name as php and path as /bin/php which is default in Linux. Executable path can be found where Php is installed in other operating systems too.

Configure Php Interpreter and Executable

Configure Php Interpreter and Executable

Run Php Project

Now everything is ok we can run our Hello World applications after putting following code to the index.php and click Run from menu.

Run Php Project

Run Php Project

This will print Hello World in the console of Eclipse.

Run Php Project

Run Php Project

PHP Tutorial Topics

  1. Introduction To PHP
  2. Installing PHP To Linux
  3. Installing PHP To Windows
  4. PHP Hello World Project with Eclipse
  5. PHP Syntax
  6. PHP Variables and Types
  7. PHP String Types
  8. PHP Numeric Type (Integer, Float, Double)
  9. PHP Boolean Type
  10. PHP Arrays
  11. PHP Operators
  12. PHP Ternary Operators
  13. PHP Constants
  14. PHP If..Elseif..Else Conditional Statements
  15. PHP Switch..Case Conditional Statements
  16. PHP For and Foreach Loop Statements
  17. PHP While and Do While Statements
  18. PHP Functions
  19. PHP Class and Objects
  20. PHP Date and Time Operations
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/php-create-hello-world-project-eclipse/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

1 Response

  1. 30/07/2017

    […] PHP Hello World Project with Eclipse […]

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)