Hi,
I am trying to run php shopping cart at my website and its flagging up with the error I've given
Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com\wwwroot\te st\plaincart\plaincart\library\config.php on line 18
Please let me know how can I solve it.
Code is:
PHP Code:
// 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', '/test/plaincart/plaincart/',$webRoot); define('SRV_ROOT', '/mydoamin/wwwroot/test/plaincart/plaincart/',$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/');
Your help would be highly appreciated.
|