Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Setup Your Local Development Environment

Abhishek Taneja
Abhishek Taneja
354 Points

when you refresh it test appear on the screen but when i refresh it it index of/ and below file name.

during refreshing index of/ does not go instead it remain there and below that file name appear which i save as php in htdocs and when i click on it it shows changes then but address above changes http://localhost/text.php.this is fine or i have to some setup changes in the system.

Hi, did you get it resolved? How did you do it? I think we have the same issue. Each time I change a web server location and refresh the browser, what appears first on the page is a link that says Index of/

Then after clicking the link, will the test site, or the test document that we typed in will display. However if I just go directly to MAMP app, and click Open Start Page and click the My Website tab, it displays it correctly, without the link Index of/ showing on the page.

1 Answer

Andy Watts
Andy Watts
20,836 Points

I am not sure what you are asking but here are some tips. Make sure you have an index.php page as this is what the browser will look for when you ask for localhost. Make sure you have a webserver installed on your machine and that it is interpreting php pages.