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 trialJuliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsHi, When I hit preview I am getting a blank page with this url: http://port-80-fofumhzvf3.treehouse-app.com
This is my code so far:
<php $name = "Mike"; $location = "Orlando"; $full_name = "Mike The Frog": $name = $full_name;
?>
<!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>Mike The Frog | Treehouse Profile</title> <link href="css/style.css" rel="stylesheet" /> </head>
<body> <section class="sidebar text-center"> <div class="avatar"> <img src="img/avatar.png" alt="<?php echo $name ?>"> </div> <h1><?php echo $name ?></h1> <p><?php echo $location ?></p> <hr /> <p>Welcome to PHP Basics!</p> <hr /> <ul class="social"> <li><a href=""><span class="icon twitter"></span></a></li> </ul> </section> <section class="main"> <pre> <?php $one = 1; $two = 2; $3 = 3;
echo $one;
?>
</pre>
</section>
</body> </html>
4 Answers
Mark Burns
1,922 PointsDid you "save" the file ? (on the top of the workspace click file>save or >save all) also there what is the name of the file if its not "index.html" you need to add it to the url
Chanse Campbell
4,453 PointsI just wanted to flag this up that I've also been having this same issue on my Macbook on these videos. The quick fix is I have to manually add index.php to the end of the URL on every workshop preview, but something must be up?
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points..sounds like it. You shouldn't have to manually type in the end of the url.
But, at least you've figured out a way to make it work regardless:-)
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsHi Mark,
I did save the index.php file and it wasn't working, but now it is....lol...
Hmmm....
Thanks:-)
Elena Paraschiv
9,938 PointsI have the same problem. Does anyone know how to view the index.php page locally. I really want to see how my code is turning. I am using Sublime text editor.
David Pena Abad
16,288 PointsDavid Pena Abad
16,288 PointsHi Juliette,
I don't know if it is a copy-paste problem, but when you have opened the first php declaration you have forgotten the question mark. You should write: <? php (...) ?>
Too, after the $full_name variable, you have written a colon, but you should write a semi-colon.
See you soon.