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

Surendra Kulkarni
Surendra Kulkarni
6,826 Points

Code with Document_Root needs help

After adding constants as per the video I am getting the following warning; so the path from receipts to inc seems to be broken

( ! ) Warning: include(C:/xampp/htdocs/shirts4mike-Pr-02-Sto2/inc/header.php): failed to open stream: No such file or directory in C:\xampp\htdocs\shirts4mike-Pr-02-St02\receipt\index.php on line 6

config file:

define ('BASE_URL' , '/shirts4mike-Pr-02-Sto2/');
define('ROOT_PATH', $_SERVER ['DOCUMENT_ROOT']  . '/shirts4mike-Pr-02-Sto2/');

receipt\index.php:

require_once ("../inc/config.php");
$pageTitle = "Thank you for your order!";
$section = "none";
include(ROOT_PATH  . "inc/header.php"); ?>

I will be greatful for any help. Thanks for your time and efforts in advance.