Jump to content

Archived

This topic is now archived and is closed to further replies.

danielforsyth

WEB_ROOT question

Recommended Posts

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.