Hi All,
I have a PHP program that includes files from the 'include' directory
relative to the path that translates to the HTTP root of the site.
This is '/var/www/html' on the server, and '~/username/public_html' on
my dev box.
My question is - is there any way to resolve the path to a file,
something like:
include GetBasePath() . '/include/top.inc';
where GetBasePath() returns '/var/www/html' or
'~/username/public_html' depending upon which server it's running?
I've looked through the manual & the FAQ but found nothing.
TIA for any suggestions.
Yours,
Duncan Bayne
I have a PHP program that includes files from the 'include' directory
relative to the path that translates to the HTTP root of the site.
This is '/var/www/html' on the server, and '~/username/public_html' on
my dev box.
My question is - is there any way to resolve the path to a file,
something like:
include GetBasePath() . '/include/top.inc';
where GetBasePath() returns '/var/www/html' or
'~/username/public_html' depending upon which server it's running?
I've looked through the manual & the FAQ but found nothing.
TIA for any suggestions.
Yours,
Duncan Bayne
Comment