How to Run a PHP File in XAMPP?

Alles, was PHP betrifft, kann hier besprochen werden.

How to Run a PHP File in XAMPP?

Postby harvey1990 » 15. August 2018 07:16

Hello, I want to start a new project at my job on an e-commerce and online store website and I need to use PHP for this project. can anybody help me to run a PHP file on Xampp v7.2.7?
harvey1990
 
Posts: 3
Joined: 15. August 2018 06:43
Location: 3945 Gore Street Houston, TX 77030
XAMPP version: v7.2.7
Operating System: Windows 10

Re: How to Run a PHP File in XAMPP?

Postby Nobbie » 15. August 2018 09:46

Create a file with PHP code, lets call it test.php. Store it to the folder c:/xampp/htdocs (results in c:/xampp/htdocs/test.php). Start Apache from the Xampp Controlbox. Open any browser and enter http://localhost/test.php in order to run your file.

If you like to put your files in a separate folder, lets say "myproject", create a folder c:/xampp/htdocs/myproject, put your test.php into that folder and enter http://localhost/myproject/test.php in your browser.

You definately should go for some books and/or tutorials about Web Programming, including Apache, PHP, MySQL etc., that is a sophisticated development environment and a forum cannot replace the urgent need of reading lots of documentation. There is also a FAQ for Xampp https://www.apachefriends.org/faq_windows.html which you should read at first.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: How to Run a PHP File in XAMPP?

Postby harvey1990 » 19. August 2018 14:25

Thanks a lot, Nobbie. that's worked for me and now I can start my work
harvey1990
 
Posts: 3
Joined: 15. August 2018 06:43
Location: 3945 Gore Street Houston, TX 77030
XAMPP version: v7.2.7
Operating System: Windows 10


Return to PHP

Who is online

Users browsing this forum: No registered users and 25 guests