how open localhost php page code example Example: simple localhost php 1) cd ~/public_html 2) php -S localhost:8000