xml - How to emulate file directory of a URL using Php -S?

one text

Solution:

"-s" flag in the PHP terminal helps to run a built-in webserver.(PHP Built-in web server)

Think like you have a status.xml in your public_html folder. You can run it in a directory like the following code through terminal:

cd ~/public_html
php -S localhost:8000

When you request for localhost:8000/status.xml, you get status.xml content through to your client.

Also, you can use a specified file as a default page through the built-in webserver.

cd ~/public_html
php -S localhost:8000 status.xml

When you request for localhost:8000, you get status.xml content through to your client.

Source