Latest posts

10/recent/ticker-posts

How to use XAMPP to run PHP Programs | How to run PHP Programs in XAMPP | PHP with XAMPP

How to run PHP programs using XAMPP ? 



XAMPP server free-open source used cross-platform, which helps to create and run programs on a local webserver.

XAMPP stands for x : cross-platform, A : Apache server, M : MariaDB, P : PHP, P : Perl

Steps for writing and Execute PHP programs

Step 1 : first, if you still need to download the XAMPP then, download the XAMPP from this site https://www.apachefriends.org/.  After downloading and installing XAMPP, open XAMPP Control Panel, then click start on Apache, MySQL, and Tomcat.



Step 2: Now, go to the XAMPP folder in C drive.




then, open the htdocs folder and create your new folder.



Step 3 :  Now in this folder, you can create a new text file as shown in the image.



Step 4 : Open the text file you have to create and write your PHP code as shown in the following image.



Step 5 : Finish your write PHP program and click on the save as button from the file tab and save your program in the folder you have created in the htdocs folder.  After selecting the location, give the name of the text file which you want to with the .php extension.
Suppose, I want to save my file with the name 'HelloPhp', then I have to type HelloPhp.php as shown in the following image.



Step 6 : Now, you have to open any browser window on your PC or Laptop. then type,
http://localhost/programs/hellophp.php

# After http://localhost/ , type your file name,
# If you have created a Folder under the htdocs folder the type Floder_Name/File_name.



Step 7 :  After entering the URL, click on enter button on your keyboard to see the output.



So this is our simple program of PHP using XAMPP, After this post, we are going to Run and Execute PHP Programs in an Online Compiler, which is based on  Command Line Interface.

I hope it will help you to Learn PHP Programming More...!

Thank You..!!!




Also Visit


Post a Comment

0 Comments