Hi,
How do you get the URL to the running php script?
For example:
http://www.example.com/path/to/script/file/script.php
I want to get:
/path/to/script/file/
Raj
| SitePoint Sponsor |
Hi,
How do you get the URL to the running php script?
For example:
http://www.example.com/path/to/script/file/script.php
I want to get:
/path/to/script/file/
Raj
Found it!
Code:$parseinfo = parse_url($_SERVER['REQUEST_URI']); echo $parseinfo['path'];

To get the current working directory you echo getcwd() and that will show the complete path

Sorry I think I misunderstood what you wanted.
Bookmarks