Specifying Variable Document Path in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Folks,

My first post to this list and forgive me if this is ground that's been trod
before, but this has been bugging me for a bit.

I'm developing a site that's going to be running on a staging environment
and a production environment. Have a number of PHP includes in the
production site that specifically call the file pathname (thus):

<?php include '/home/production_site/public_html/pagename.php' ?>


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?


Thanks in advance,

Anthony

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux