Hi, good day..
I'm in a really tight spot right now, and I'm really desperate for some help..
I'm doing this plaincart for my web development class, and I've pretty much reached the end of my rope on trying to figure out 3 things! And I think those are pretty important things, so I'm asking for some help from you guys..
The main problem I'm having is that my index and everything else has an error on top saying:
Notice: Undefined index: DOCUMENT_ROOT in E:\hosting\vhosts\xxxxx.com\httpdocs\cartproject\library\config.php on line 18
Notice: Undefined index: REQUEST_URI in E:\hosting\vhosts\xxxxx.com\httpdocs\cartproject\index.php on line 7
and another thing is that my none of my pictures are showing, from my header to the products itself, there's nothing being shown but the table and background and menu..
I've already uploaded this into the webhost I'm using seeing that it was a "step" in the professor's instructions..
I'm posting the code below from config.php from the library folder.
<?php
ini_set('display_errors', 'On');
//ob_start("ob_gzhandler");
error_reporting(E_ALL);
// start the session
session_start();
// database connection config
$dbHost = 'localhost';
$dbUser = 'root';
$dbPass = '';
$dbName = 'phpwebco_shop';
// setting up the web root and server root for
// this shopping cart application
$thisFile = str_replace('\', '/', FILE);
$docRoot = $_SERVER['DOCUMENT_ROOT'];
$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot = str_replace('library/config.php', '', $thisFile);
define('WEB_ROOT', $webRoot);
define('SRV_ROOT', $srvRoot);
// these are the directories where we will store all
// category and product images
define('CATEGORY_IMAGE_DIR', 'images/category/');
define('PRODUCT_IMAGE_DIR', 'images/product/');
Actually, as you guys can see, I haven't changed anything from the main code supplied. I've already tried changing the DOCUMENT_ROOT, but it still happens, and the error would still pop up, and the difference is that "DOCUMENT_ROOT" will be switched to whatever other string that I put in..
Its really hard being a newb.. Especially if web programming isn't really part of my course.. I'm supposed to be an artist..
Thank you guys in advance.. I really appreciate it..