Previewing
In a previous chapter, we configured the Apache webserver to work on your computer. Now you will need your localhost address, as setup earlier. Usually, it's http://localhost/ or http://localhost:8080/. In WebCoder, go to Functions and select Settings. Now, select the Preview tab and then the Servermappings tab. Make sure that the "Enable servermappings" checkbox is checked. In the "Edit servermapping" part of the dialog, enter your local document root in the first field, and your localhost address in the second field. In case you used the default values while installing Apache, the values should look something like this:
Path: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\
URL: http://localhost:8080/
Check that these values work on your machine and then click the Add button. Now, click Ok in the dialog and you're good to go. If you wish to test your new setup, enter some PHP code in a document (try the Hello world chapter in this tutorial, for instance), save it in your document root (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\) and then press F12 in WebCoder to preview it.
© php5-tutorial.com 2007-2012