views:

23

answers:

2

Hi guys, I just posted a similar question, but deleted it because I realized I was working with an old file...doh!

I am just trying to get my XAMPP setup working for me.

I have a live site that navigates to a login page at http://www.monkeycalendar.com/arvindkt/login.php

That login page includes a root.php file that is found at http://www.monkeycalendar.com/arvindkt/root.php

Live site works great.

My localhost is set up so my sites are a folder in localhost:

IE: http://www.example.com = localhost/example.com

I'm having problems figuring out how to make my root folder point to the right directory. Any help would be much appreciated:

root.php:

# local settings define("SITE_ROOT" , $_SERVER['DOCUMENT_ROOT']."/arvindkt"); define("SITE_URL" , "http://localhost/monkeycalendar.com"); define('DB_HOST', "localhost"); define('DB_USER', "root"); define('DB_PASS', ""); define('DB_NAME', "dev.monkeycalendar");

+1  A: 

If root.php resides in the site root, how about

define("SITE_ROOT"      ,  dirname(__FILE__));
Pekka
I *think* that worked. It got me to the next line and got me to an error with the db (which I haven't set up yet). So I tentatively thank you! :)
Joel
indeed-that did it. Thanks!
Joel
A: 

Try:

dirname(__FILE__)
marpetr