First of all, if you read this, thank you in advance for your patience,- I'm fairly new at PHP and have an issue which I will try to explain/describe.
//set default path
///var/www/vhosts/www.mydomain.com/httpdocs/
$url = 'http://mydomain.com/skins/coolblue/tmp';
$url2 = 'http://mydomain.com/skins/coolblue/tmp';
$doc = $_SERVER['DOCUMENT_ROOT'];
$path = '/templates/';
$actual_url = $doc.'/skins/coolblue/tmp'.$path;
(I had a developer originally build my site and configure my server, but he's gone now)
my site is hosted on a dedicated server with plesk control panel, so when I called Godaddy and asked them the value for ['DOCUMENT_ROOT']
, they gave me * /var/www/vhosts/www.mydomain.com/httpdocs/*
my issue is, I use dynamic urls eg subdomain.mydomain.com(which is already configured and works properly), which in turn determines content, and being that the output comes from a particular script using the $_SERVER['DOCUMENT_ROOT']
as above, the url is always the static url in the www.++++ format. I want the url to be dynamic.
Is there a way to go around this, or can I change the $doc = $_SERVER['DOCUMENT_ROOT'];
to the actual url of the script and add in the dynamic domain variable ie http://$subdomain/domain.com
? I have tried just about every variation of the path with no luck. Do you have any suggestions? As an aside, is $doc = $_SERVER['DOCUMENT_ROOT'];
a necessary, or was it the choice of the developer instead of writing the path out? - Thank you again