Jump to content

WEB_ROOT question


danielforsyth

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.