0
$url = "https://". $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'] ;
Result = localhost/Dashboard/folders/test/Florianopolis.php
This code above shows me everything, including the file name. It has some method of not showing the file?
So would you like it to stay = localhost/Dashboard/folders/test/
FILE show me this result = http://Applications/XAMPP/xamppfiles/htdocs/Dashboard/folders/test/footer.php
DIR show me this result = http://Applications/XAMPP/xamppfiles/htdocs/Dashboard/folders/test/
I don’t want the full path /Applications/XAMPP/xamppfiles/htdocs/, I only want localhost/Dashboard/folders/test/
Because this will serve both online and offline server.
Can someone please help me?
PS: I edited the previous question, so I think it’s clear!
What version of PHP?
– Hiago Souza
could attach a pint of your project’s folder structure?
– DNick
Why do not want to use the absolute path being that solves your problem?
– Woss
PHP version is 5.3
– Eduardo
I do not use the absolute path because this site has several domains and would not like to keep editing the absolute path for each domain.
– Eduardo
Structure updated according to project.
– Eduardo