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 trialMohammed Ali Zaheer
11,787 Pointsshirts.php
after writing code into shirts.php, the menu gives an error of URL localthost/shrits.php not found....please helpppp!!!
5 Answers
Don Shipley
19,488 PointsSorry I made an error, If your shirts.php is inside of your inc folder, you are calling for the link in your index.php, you do not need to go up one directory. The link would be <a href="inc/shirts.php> Shirts</a>. Looking back on my files the shirts.php and contact.php are saved in the main folder along with the index.php if you move your files shirts.php and contact.php to be in the same directory as your index.php your links will work as they are without making any changes.
Sorry for the previous error on my part.
Mohammed Ali Zaheer
11,787 Pointsyeah you are write..its working now ..thanks man :)
Mohammed Ali Zaheer
11,787 Points<?php include('inc/header.php'); ?>
<div class="section page">
<h1>Mike’s Full Catalog of Shirts</h1>
</div>
<?php include('inc/footer.php'); ?>
Nino Merdzanovic
Courses Plus Student 15,758 PointsThe content of header.php please, and the .htaccess
Mohammed Ali Zaheer
11,787 Points<html> <head> <title><?php echo " Shirts 4 Mike"; ?>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.php">Shirts</a></li>
<li class="contact"><a href="contact.php">Contact</a></li>
<li class="cart"><a href="#">Shopping Cart</a></li>
</ul>
</div>
</div>
<div id="content">
what is .htaccess?
Don Shipley
19,488 PointsAre your saving the shirts.php inside the root directory or inside the inc folder?
Mohammed Ali Zaheer
11,787 Pointsin inc folder as illustrated in a video..
Don Shipley
19,488 PointsDo not remember the video but the index file would be in the root folder, In that case your link would work. Inside the inc folder you would need to add ../shirts.php adding the ../ to go up one directory. Try placing the shirts.php inside the same location as your index.php Then your link should work..
Nino Merdzanovic
Courses Plus Student 15,758 PointsNino Merdzanovic
Courses Plus Student 15,758 PointsCan you post the code of .htaccess and shirts.php?