Running the built-in server
suggest changephp -S localhost:80
PHP 7.1.7 Development Server started at Fri Jul 14 15:11:05 2017
Listening on http://localhost:80
Document root is C:\projetos\repgeral
Press Ctrl-C to quit.
The banner above is from PHP 7.1.7; the wording differs by version.
This is the simplest way to start a PHP server that responds to requests made to localhost at port 80.
The -S option starts a web server.
The localhost:80 indicates the host that we are answering and the port. You can use other combinations like:
- mymachine:80 - will listen on the address mymachine and port 80;
- 127.0.0.1:8080 - will listen on the address 127.0.0.1 and port 8080;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents