I want to dynamically create a link to a file, depending on what domain the script is on. So link could be http://localhost/downloads/file.zip or http://www.domain.com/donloads/file.zip
$_SERVER['SERVER_NAME'];
does
work with subdomains asswell.. like sub.domain.com
Try it and see?
Will do. marking as resolved