Jump to content


Photo

WEB_ROOT question


  • Please log in to reply
No replies to this topic

#1 danielforsyth

danielforsyth
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 08 March 2006 - 11:06 PM

I downloaded an open source shopping cart and I am having problems with it because of the WEB_ROOT function. i.e. Links that should go to

[a href=\"http://root.danielforsyth.com/shop/admin/category/\" target=\"_blank\"]http://root.danielforsyth.com/shop/admin/category/[/a]

are going to

[a href=\"http://root.danielforsyth.com/homepages/44/d88778109/htdocs/shop/admin/category/\" target=\"_blank\"]http://root.danielforsyth.com/homepages/44...admin/category/[/a]

So do I need to change a setting with my host? or do I need to change the code in the config file... here it is:

// 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);


please help! thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users