This is the url of my script: localhost/do/index.php
localhost/do/index.php
I want a variable or a function that returns localhost/do (something like $_SERVER['SERVER_NAME'].'/do')
localhost/do
$_SERVER['SERVER_NAME'].'/do'
$_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']);
2.1m questions
2.1m answers
60 comments
57.0k users