How to Quick Run PHP Project on Localhost?
Hi Artisan,
Now, let's see an article of how to run php project in wamp. This article goes in detailed on how to run php project in ubuntu. you can understand a concept of how to run php project in xampp. I’m going to show you about how to run php framework program. Alright, let’s dive into the details.
1. Open a terminal or command prompt and navigate to the directory where your PHP project is located.
2. If your project has a index.php file, run the following command:
php -S localhost:8000
This command starts the PHP development server on port 8000 and serves the index.php file.
3. If your project doesn't have an index.php file, but has a different entry point, replace index.php with the name of your entry point file in the command:
php -S localhost:8000 your-entry-point.php
4. Once the server is running, you can access your PHP project by opening a web browser and navigating to http://localhost:8000. If you've configured the server to use a different port, replace 8000 with the appropriate port number.
I hope it can help you...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Subtract Hours from DateTime in PHP?
- PHP Add Hours to Datetime Example
- How to Add Months to Date in PHP?
- PHP Curl Delete Request Example Code
- PHP Curl Request with Certificate (cert pem file option) Example
- How to Convert XML File to Array in PHP?
- PHP Remove Directory and Files in Directory Example
- PHP Create Directory If It Doesn't Exist Example
- How to Add JQuery Modal Popup in PHP?
- How to Get a Current Page URL in PHP?
- How to Get php.ini File Path in Ubuntu?
- How to Count Number of Files in a Directory in PHP?
- How to Remove Null Values from Array in PHP?