Specify a port number for previewing PHP pages

Some PHP templates require a specified port number as identified in the configuration file in order to preview the pages associated with the site. However, the port which Microsoft Expression Development Server uses is randomly chosen each time a site is opened.

To specify a port number for previewing a PHP page

  1. Preview the web page by doing one of the following:

    • Press F12.

    • On the Common toolbar, click Preview Cc294836.32613350-d7fe-4254-85fc-157a1600854f(en-us,Expression.40).bmp, or click the arrow next to the button to select a browser.

    • On the File menu, point to Preview in Browser, and then click the browser and window size you want.

    Note

    You must save your page before you preview it in a browser.

  2. Make note of the port number in the address bar. For example, the address might be https://localhost:50118/mysite/default.php. The port number is 50118.

  3. Open the configuration file in which you need to specify the port number for your application or template, and replace the existing port number with the port number you noted in the previous step.

    Note

    The port number will remain the same until you close the site.

  4. Refresh the page that you opened in step 1, or preview the page again by repeating step 1.

Alternately, you can use the server variable $_SERVER['SERVER_PORT'] to identify the port from within your PHP script.

See also

Tasks

Previewing a PHP page
Installing Expression Development Server

Concepts

Preview pages in a browser

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.