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 trialMartina Carrington
15,754 Pointsi received a error message
ok i follow the steps on the basic php lesson but some reason i received Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /home/treehouse/workspace/index.php on line 22. but everything look fine
Martina Carrington
15,754 Pointsthis is INDEX.PHP
<?php
$pageTitle = "Personal Media Library";
include("inc/header.php"); ?> <div class="section catalog random">
<div class="wrapper">
<h2>May we suggest something?</h2>
<ul class="items">
<li><a href="details.php?id=201"><img src="img/media/forest_gump.jpg" alt="Forrest Gump"><p>View Details</p></a></li><li><a href="details.php?id=204"><img src="img/media/princess_bride.jpg" alt="The Princess Bride"><p>View Details</p></a></li><li><a href="details.php?id=302"><img src="img/media/elvis_presley.jpg" alt="Elvis Forever"><p>View Details</p></a></li><li><a href="details.php?id=303"><img src="img/media/garth_brooks.jpg" alt="No Fences"><p>View Details</p></a></li>
</ul>
</div>
</div>
<?php include("inc/footer/php);?> <!--end content-->
3 Answers
rhysadams
4,847 PointsCould it be that your footer is "inc/footer/php" when it should be "inc/footer.php"?
Let me know if that works
Martina Carrington
15,754 PointsHi rhysadams it works but now it say Parse error: syntax error, unexpected ';' in /home/treehouse/workspace/index.php on line 19 .
rhysadams
4,847 Pointsmartina carrington Try adding a ">" after the "include("inc/footer.php);?". To close of the PHP tag.
Martina Carrington
15,754 Points<?php
$pageTitle = "Personal Media Library";
include("inc/header.php"); ?> <div class="section catalog random">
<div class="wrapper">
<h2>May we suggest something?</h2>
<ul class="items">
<li><a href="details.php?id=201"><img src="img/media/forest_gump.jpg" alt="Forrest Gump"><p>View Details</p></a></li><li><a href="details.php?id=204"><img src="img/media/princess_bride.jpg" alt="The Princess Bride"><p>View Details</p></a></li><li><a href="details.php?id=302"><img src="img/media/elvis_presley.jpg" alt="Elvis Forever"><p>View Details</p></a></li><li><a href="details.php?id=303"><img src="img/media/garth_brooks.jpg" alt="No Fences"><p>View Details</p></a></li>
</ul>
</div>
</div>
<?php include("inc/footer/php);?> <!--end content-->
Martina Carrington
15,754 Pointsomg rhysadams thank you so much
rhysadams
4,847 PointsYou're more than welcome :) - If you're happy Like my original answer and mark as solved!
Thank you.
rhysadams
4,847 Pointsrhysadams
4,847 PointsCan you paste your code please?