TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

PHP

Getting Started with PHP

Introduction

Let’s Get Started with PHP. In this tutorial, we will run a simple PHP application called Hello World. PHP is a server-side programming language used to enhance web pages.

PHP is an HTML-embedded scripting language. The PHP code can be embedded inside HTML code by enclosing it inside <?php and ?> tags. PHP code is executed on the server unlike JavaScript.

Download

You can download PHP from the below URL:

http://php.net/downloads.php

Detailed steps can be found here:

https://www.testingdocs.com/download-and-install-php/

Note that if you have installed XAMPP you already get PHP. XAMPP is the most popular PHP development environment. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP. The XAMPP package has been set up to be incredibly easy to install and to use.

https://www.testingdocs.com/xampp-download-and-install/

Hello World in PHP

<!DOCTYPE HTML>

<html>

<head>

<title>PHP Example</title>

</head>

<body>

<?php

echo "Hello World!";

?>

</body>

</html>

 

 

Run the PHP Program

Create a folder named FirstProgram inside the htdocs folder under the XAMPP install directory.

Create a text file inside the above folder and give a name. Example HelloWorld.php

Add the above code to the file and save it.

Open your favorite browser and visit the URL:

http://localhost/firstprogram/HelloWorld.php

Make sure you start the Apache server from the XAMPP control panel.

 

 

Hooray..!  you have written and run your first PHP program.

Dependency Management

PHP dependency management tool is called Composer. Composer will automatically manage the dependencies in the project. It takes care of the versioning and other things. Instructions to download and install Composer on Windows can be found here :  https://www.testingdocs.com/composer-download-on-windows/

Next Step

https://www.testingdocs.com/php-program-to-add-two-numbers/

Related Posts

Compoer Command line command

PHP /

Install Slim Framework on Windows

php download website

PHP /

Download and Install PHP on Windows

Composer Install Windows

PHP /

Composer Download on Windows

Apache conf file

PHP /

PHP 7 Configuration in Apache Server

testing php linux

PHP /

Testing PHP with Apache Server on Linux

‹ PHP Program to Add Two Numbers› PHP Script Syntax

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version