After I transfer a site to another hosting. I found out that my code $_SERVER['DOCUMENT_ROOT'] doesn't return the real physical path of the site.
The site is sharing IP with other sites on that server. And before the domain transferred, we can only tests it at xx.xx.xxx.xx/~mysite.
I think $_SERVER['DOCUMENT_ROOT'] returns the physical path for xx.xx.xxx.xx but not the xx.xx.xxx.xx/~mysite.
Are they using the port to hosting different sites on one IP?
How to find the physical path of the site on this kind server set up?
Thanks!