PHP Help Web_Root

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zahidanwar
Forum Newbie
Posts: 1
Joined: Fri Jan 30, 2009 7:14 am

PHP Help Web_Root

Post by zahidanwar »

Hi,

I am a novice when it come sto PHP so please bare with me.

I am trying to create a admin section to my website so that i may manage products and categories so i used something called plaincart, however when i log into the admin section i am confronted with a error that a file could not be located, i believe this is because of this piece of coding found in the config.php, could anyone make some sense out of this for me in a idiot proof way.

Thanks

$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);
jothirajan
Forum Commoner
Posts: 69
Joined: Tue Jan 27, 2009 12:06 am

Re: PHP Help Web_Root

Post by jothirajan »

paste the error you got...
Post Reply