PHP Built-in web server

PHP has inbuilt Web Server which we are using Command Line. The web server runs only one single-threaded process, so PHP applications will stall if a request is blocked.


cd ~/public_html 
php -S localhost:8000 
 
The terminal will show:

PHP 7.2.0 Development Server started at Thu Jul 21 10:43:28 2021 
Listening on localhost:8000 
Document root is /home/me/public_html 
Press Ctrl-C to quit

8-August 4:21 PM 442 Views

 Prev question

Next question