The fact that the content of your
.php files is being echoed back to you suggests that the server isn't configured correctly, either:
- You have yet to install PHP
- Your server is configured to return
.php files as plain text
If you need to install PHP, either go to http://windows.php.net/download/ or use the Web Platform Installer to install PHP.
If PHP is installed, but requires configuration, take a look at the installation instructions from php.net.
To answer the "view the contents of wwwroot as if it were live" section, you can setup additional "bindings" in IIS Manager to allow you to refer to the server without a DNS change, or you can make a change to your local
hosts file (found in
windows\system32\drivers\etc\hosts) by adding a line such as:
to the file. By specifying the IP address of the new server, along with the DNS name you wish to map to it, any requests from your PC to that domain name will be routed to the new IP address (Note: You may need to run
ipconfig /flushdns from an administrative command prompt to ensure that your DNS cache is properly flushed. Also, close fully the browser you want to test in as some can be quite aggressive in caching DNS results).