PHP Tutorial

Define PHP

PHP Installation

PHP INI File

PHP Comment

PHP Case Sensitivity

PHP Variable, DataType

PHP Echo & Print

PHP Operators

PHP Receiving Input

Decision Making - if...else

PHP Switch Case

PHP Loops

PHP Jumping Statement

PHP Image Gallery

PHP File Upload

PHP Arrays

PHP Date Functions

PHP String Functions

PHP Math Functions

PHP Functions

PHP Variable Scope

PHP Constant Variable

PHP Superglobals

PHP Form Validation

PHP Include Statement

PHP Filter

PHP File Handling

PHP Cookies

PHP Session

PHP Send Emails

PHP Captcha

PHP MySQL Select

PHP MySQL Insert

PHP MySQL Delete

PHP MySQL Update

PHP MySQL Injection

PHP Assignment

Page Stats

Visitor: 646

How to Install PHP Software

In order to develop and run PHP Web pages vital components need to be installed on your computer system.

  1. Web Server PHP will work with virtually all the Web Servers, including Microsoft's Internet Information Server (IIS) but most often used is freely available Apache Server.
  2. Database PHP will work with virtually all the database softwares, including Oracle, MSSQL but most commonly used is freely available MySQL database.
PHP available Softwares are:
  • WAMP Server (Windows, Apache, MySQL, PHP)
  • LAMP Server (Linux, Apache, MySQL, PHP)
  • MAMP Server(Macintosh, Apache, Mysql and PHP)
  • XAMPP Server - X meant for Operating System, Apache, MySQL, PHP, and PERL.

After software installation you can check whether it is installed successfully or not by written the 'Hello World' example.

Example 1: To print a Message, "Hello World"

<html>
   <body>
      <?php
         echo "Hello World";
      ?>
   </body>
</html>

To save the PHP file save in the 'htdocs' folder which is in 'c:\xampp\', mention any filename with the '.php' extension, To run the PHP file open browser type the URL 'http://localhost/filename.php' or 'http://127.0.0.1/filename.php'

Code Explanation:
  • A PHP scripting block always starts with <?php and ends with ?>. It can be placed almost anywhere in an HTML document.
  • Echo statment is use for output.
  • A semicolon (;) is use at the end of each statement.
Updated: 7-Apr-21