Search code examples
phpwebmatrix

How to fix a PHP website on localhost that shows as a directory and not a website?


I installed Webmatrix 3 yesterday to create a PHP website. When I try to run the basic PHP page, I only see the directory of the project files but I want to see the web page directly.

I only have a simple page so far, but this is a major issue. When I run the project file I only get:

localhost - /

06/07/2015    14:24        <dir> App_Data
06/07/2015    14:24        <dir> bin
06/07/2015    16:39          187 PHPPage.php
06/07/2015    15:11          659 web.config

The only edits to webmatrix have been adding the PHP extension file.


Solution

  • Rename your PHPPage.php to index.php

    Only index.php is run automatically instead of showing the dir structure