Basic Overview of PHP and Its Uses


Basic Overview of PHP | How PHP works

 

Before getting started with the basic overview of PHP, it is quite necessary to know the basic understanding of HTML, CSS, JAVASCRIPT. If you have the idea of these three things then you can continue with PHP easily. We will discuss HTML,CSS,JAVASCRIPT later on.

PHP stands for “Hypertext Preprocessor”. It is an open-source scripting language and a powerful tool. It is widely used for creating dynamic websites, interactive page content.

 

Uses of PHP and the Basic Overview of PHP

  •  PHP is the most used language for websites all over the world nowadays. Most of the websites are made with WordPress and WordPress has a large number of plugins and these plugins are made in PHP.
  •  World’s biggest social media network Facebook which is run by PHP.
  • PHP is used to create application software like stock management, inventory management, billing software, and custom application, etc.
 

How PHP works

PHP works with its file system and those files can contain text, HTML, CSS, javascript, PHP Code and have the “.php” extension. PHP codes are executed on the server and the output is displayed to the browser as plain HTML. We can execute PHP scripts online which is a web server and offline which is a local server. We will discuss how to run PHP programs on the local server.
 
 

Benefits/ Advantages of PHP / Overview of PHP

  •  PHP is used to control user access authorization.
  • With PHP we can display images, PDF files, and even Flash movies.
  •  We can run PHP on various platforms like Windows, Linux, Unix, etc.
  • PHP is compatible with servers like Apache, IIS, etc.
  • PHP is supported by a wide range of databases.
 

Requirements for running PHP programs/scripts/codes

  •  First of all, install any local server like WAMP or XAMP, etc.
  •  Install any editor like notepad++ or code-lobster or sublime text etc. but in my case, I use code-lobster mostly due to its reliable features and I recommend you to use code-lobster if you want.
 

How to run PHP programs/scripts in local server

 After completing the installation process, click on the WAMP server and wait until it turns into a green icon. To run the PHP scripts we have to start the WAMP server that provides MySQL database access, we don’t need any extra database to be installed.

 

Type in the address bar of your browser “localhost” then you can see a list of Index which contains the folder names of your PHP scripts or projects. Again type “localhost/PHPMyAdmin” in the address bar then a screen will appear with username and password.

Type the username with “root” and leave the password field blank and press ENTER. Now you are in PhpMyadmin where you can create a database and the corresponding tables for the PHP projects.

 
 Create a folder for your project in the place you have installed the WAMP server. I suggest you install the WAMP server in D or E drive. Go to the ‘www’ folder inside the WAMP folder and then keep all your PHP projects or folder of the projects here.

 

To run the scripts or projects you did just go to the address bar and type “localhost/name of the PHP script file with .php extension as “localhost/helo.php” then you can see the output of the script which is executed by the server and returned back in the browser as plain HTML.

Also read, Introduction to PHP variables, data types, and strings

NOTE:- I hope this tutorial will help you to understand the basic overview of PHP. If you have any doubt then please leave your comment below. Know more about PHP

 
 


2 thoughts on “Basic Overview of PHP and Its Uses”

Leave a Comment