Determining the complete URL but without the script name?

xaioner

New Member
Basically I'm trying to determine the complete web-accessible URL of a certain script, but without the script name.For example, I was thinking of something along these lines:\[code\]$fullURL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];echo $fullURL;\[/code\]So if the file was \[code\]http://example.com/path/to/file.php\[/code\], then that's what it would display: \[code\]http://example.com/path/to/file.php\[/code\]. However, I want it to display \[code\]http://example.com/path/to/\[/code\]Is this possible, and if so, how?
 
Back
Top