This may or may not help you. I thought I had the same problem. When I would go to my Test directory and click on one of my PHP files, it wouldn't display properly. Then I realized the problem was that I had to use the correct structure of http://localhost
Does that help?