$_SERVER["SCRIPT_URI"] not working? alternative?
If you need domain name, use:
$_SERVER['HTTP_HOST']
When in doubt
var_dump($_SERVER);
Depending on what you want, I'd use one of the following:
- $_SERVER['PHP_SELF'] for the script file location
- $_SERVER['SERVER_NAME'] for the host name
From the php docs
EDIT: Maybe PHP_SELF isn't the best. See comments.