Jump to content

Php code problem


pacognovellino

Recommended Posts

Hello everyone, I have a problem with a shopping cart script i downloaded, I dont know how, but every lik in the admin section repeats the url twice, instead of http://localhost/nina/admin/category/, the url that I get is http://localhost/nina/admin/nina/admin/category/ the code of the config file in the shopping cart 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);

 

I downloaded the script from here http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/131656-php-code-problem/
Share on other sites

Archived

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

×
×
  • 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.