I have several websites and I plan to use the same php file to notify my updates in all the sites.
But in this way I have the problem that I can’t use, as I did so far, a relative path, given the fact that my websites are hosted in different remote server.
So I wonder if there is in php a way to switch the $root variable from a (relative) local address (http://localhost) to a remote one (https://myremotewebsite), according to the fact to be called from a local server or from a remote one.
The variable to switch is one: $root. What is the $root value? In localhost something, in remote other.
maybe using (also) CSS: to show or hide a content (according to its “class”).
But using also $_SERVER, I guess… to switch from a class to another…