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 PHP Basics PHP on the Web Combining Multiple Files with Includes

Hello I'm at the portion of the video to include the units.php file and I'm not able to get it to show. (I did save)

<section class="main"> <h1>My First PHP Page</h1>

      <h2>Unit Conversion</h2>
<?php include 'inc/units.php';?>
      <hr />

      <h2>Daily Exercise</h2>
    </section>

https://w.trhou.se/tqjibmk46h

If someone could tell me where I went wrong I'd appreciate it.

2 Answers

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

You need to spell the directory correctly - it is case sensitive.

I'm having the same issue.

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

The code above has a lower case "i" for the Inc directory and in that workspace (follow that link) the folder has an uppercase "I" - if you fork the workspace and change the code to an upper case "I" it works as expected. (or rename the directory)

<?php include 'Inc/units.php';?>