β β Get Started with PHP | Hello World in php (Windows)
What is PHP ?
πStand for PHP Hypertext Preprocessor
π Created by Rasmus Lerdorf in 1994
π Server Side Scripting Language
π Make Dynamic Website with PHP
System Requirement:
- Windows 7 and above operating system
Let's Start:
Download XAMPP
Go to https://www.apachefriends.org/download.html and download latest XAMPP software.
Install XAMPP by clicking on downloaded executable file.
This will install following on your system
Apache Web Server
Mysql Database Server
PHP language
Open Xampp Control Panel. Start Module Apache and MySQL. This will start Apache Web Server and MySQL DB server.
Now go to http://localhost/dashboard/
If you see above screen opened in browser,
this means apache is successfully installed and running.
Now, go to http://localhost/dashboard/phpinfo.php
here, we can check version of php installed. In this case it PHP Version 7.3.27
phpMYAdmin is the default GUI (graphical user interface)
that is bundled with XAMPP software. We can create database and work on MySQL DB through phpMYAdmin
to create first PHP application web page, open XAMPP Control Panel and click on Explorer button. This will open the directory in which XAMPP bundle is installed on your computer.
open htdocs folder and create a folder named "test". inside test folder create a file "index.php". php is the extension used for a php file.Copy and paste the following code in index.php.
<?php
echo "Hello World !. This is my first PHP application";
?>
now go to http://localhost/test/index.php
Congratulations. You have just created your first PHP Web Application.