First of all, if you read this in advance for your patience, I am pretty new to PHP and have a problem that 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 who originally created my site and set up my server, but he left now) my site is hosted on a dedicated server with the plesk control panel, so when I called Godaddy and asked for their meaning for ['DOCUMENT_ROOT'] , they gave me * / var / www / vhosts / www.mydomain.com / httpdocs / *
My problem is that I am using dynamic URLs like subdomain.mydomain.com (which is already configured and working correctly), which in turn determines the content, and also that the output comes from a specific script with $_SERVER['DOCUMENT_ROOT'] as above, url is always a static url in www format. ++++. I want the url to be dynamic.
Is there a way around this, or can I change $ doc = $_SERVER['DOCUMENT_ROOT']; to the actual script url and add a dynamic domain variable i.e. http://$subdomain/domain.com ? I tried almost all the options without luck. Do you have any suggestions? Aside, is $doc = $_SERVER['DOCUMENT_ROOT']; necessary, or was it a developer choice instead of writing a path? - Thanks again.
source share