Jump to content

Get root URL and store it in a variable


Bman900

Recommended Posts

Is there a way to basically get the location of a file minus the file name?

 

Basically I want a code that will spit back the root of my files. For example if my files would be in

 

root the code above: $_SERVER['SERVER_NAME']; would work just fine for a link, but what if some one puts those files in a folder like root>backup the link would not work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.