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 trial

PHP

Eric Washington
seal-mask
.a{fill-rule:evenodd;}techdegree
Eric Washington
iOS Development with Swift Techdegree Student 21,884 Points

MAMP Working Fine, Index.php wont display website! Please help!!

Ive watched the videos over and over and I still have a headache because the index.php page wont display when I click refresh. My MAMP is working fine and I even was able to load contact when I made a separate page called info.php. I'm not sure what I'm doing wrong. The page on displays when it has the html extension behind it. Please help!

My code is below:

  <html>
<head>
    <title><?php echo "Shirts 4 Mike", ?></title>
    <link rel="stylesheet" href="css/style.css" type="text/css">
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css">
    <link rel="shortcut icon" href="favicon.ico">
</head>
<body>

    <div class="header">

        <div class="wrapper">

            <h1 class="branding-title"><a href="./">Shirts 4 Mike</a></h1>

            <ul class="nav">
                <li class="shirts"><a href="#">Shirts</a></li>
                <li class="contact"><a href="#">Contact</a></li>
                <li class="cart"><a href="#">Shopping Cart</a></li>
            </ul>

        </div>

    </div>

    <div id="content">

        <div class="section banner">

            <div class="wrapper">

                <img class="hero" src="img/mike-the-frog.png" alt="Mike the Frog says:">
                <div class="button">
                    <a href="#">
                        <h2>Hey, I&rsquo;m Mike!</h2>
                        <p>Check Out My Shirts</p>
                    </a>
                </div>
            </div>

        </div>

        <div class="section shirts latest">

            <div class="wrapper">

                <h2>Mike&rsquo;s Latest Shirts</h2>

                <ul class="products">
                    <li><a href="#">
                            <img src="img/shirts/shirt-108.jpg">
                            <p>View Details</p>
                        </a>
                    </li><li>
                        <a href="#">
                            <img src="img/shirts/shirt-107.jpg">
                            <p>View Details</p>
                        </a>
                    </li><li>
                        <a href="#">
                            <img src="img/shirts/shirt-106.jpg">
                            <p>View Details</p>
                        </a>
                    </li><li>
                        <a href="#">
                            <img src="img/shirts/shirt-105.jpg">
                            <p>View Details</p>
                        </a>
                    </li>                               
                </ul>

            </div>

        </div>

    </div>

    <div class="footer">

        <div class="wrapper">

            <ul>        
                <li><a href="http://twitter.com/treehouse">Twitter</a></li>
                <li><a href="https://www.facebook.com/TeamTreehouse">Facebook</a></li>
            </ul>

            <p>&copy;<?php echo date('Y'); ?> Shirts 4 Mike</p>

        </div>

    </div>

</body>
</html>

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Eric,

The only problem I can see is you have a comma where a semicolon should be in your first line of code, at the end of your echo statement is the error I'm referring to.

See the below.

<title><?php echo "Shirts 4 Mike"; ?></title>

As you can see after the ending double quote there is now a semicolon instead of a comma.

Happy coding!

Andrew Rady
Andrew Rady
20,880 Points

Hey Eric,

I looked everything over and tested it on my MAMP as well. Chris was right just need to change that one line of code and everything should workout!