On Windows, to run the PHP web server from the command prompt I type:
php -s localhost:80800 -t public
And I get this error:
Could not open input file : localhost:8080
And yet cmd php test.php will echo the text. Why?
It was just the capital S.
php -S localhost:8888 -t public
Now I can see the page in a browser.
I had to cd to the right directory ...and public has an index.php file.
It will work without using XAMPP/WAMP or any other external server, as PHP has its own server inbuilt. You have done a mistake in typing s in php -s localhost:80800.
This command will work - php -S localhost:80800.
"s" in the command will be capital, not small...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With