On Tuesday 26 October 2004 04:46, Anthony Baker wrote:

> The problem here is that the path will vary slightly depending on whether
> it's the staging server or production server. I'd ideally like to set a
> single global variable that can handle this so I don't have to hard-code
> paths across the site (as I'm doing now).
>
> Is there any easy way to accomplish this?

Have a look at:

  print_r($_SERVER);

and find something that is unique (to each server) that you can use. 
$_SERVER['HTTP_HOST'] is usually a good candidate.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I know it all.  I just can't remember it all at once.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to