Serving the "Hello World!" PHP script Using XAMPP
-
Download the XAMPP installer from Apache Friends
-
Install XAMPP at C:\xampp
-
Create the new directory php-test under C:\xampp\htdocs
-
Write a php script like the one shown below and store it as the file C:\xampp\htdocs\php-test\helloWorld.php
<!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <?php print "<h2>Hello World!</h2>"; ?> </body> </html>
-
Double click the XAMPP Control Panel and start Apache (see red circle below)
-
-
If you are running another application on port 443 (such as for instance Skype), then you will get an error message (see red arrow pointing to red text above) and need to shut down that application and restart Apache
-
Open the link http://localhost/php-test/helloWorld.php