danielforsyth Posted March 8, 2006 Share Posted March 8, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/4480-web_root-question/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.