Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShahzain Hashmi
2,360 PointsIndex.html isn't showing up
index.html isn't showing up when previewing the php website. Could someone read my code and tell me why?
2 Answers
Chris Shearon
Courses Plus Student 17,330 PointsI think by default the render method looks in a 'templates' folder for the file. So depending on where you saved the 'index.html', you may have to move up a directory or two. I already had a html file I was working with and I saved it in the same root as 'index.php'. I had to move up a directory in the render method. Use '../' to move up one directory. For example: "$app->render('../index.html');" This may or may not help you but it's something I learned when I had the same issues. On a side note, I'm using Eclipse IDE not workspaces so that may or may not be a contributing factor.
Harsh Verma
659 PointsThanx , solved the problem !
Michael Soileau
9,431 PointsToo many variables. Is your .htaccess file setup correctly?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L]
Shahzain Hashmi
2,360 PointsShahzain Hashmi
2,360 Points