domain ()

Returns the domain (and port) of the web page that this script is currently running on. This method only works correctly when run from a publicly-accessible web page.

Access

public static

Source

Method defined in extensions/s3browserupload.class.php | Toggle source view (9 lines) | View on GitHub

public static function domain()
{
    if (isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']))
    {
        return $_SERVER['SERVER_NAME'] . ((integer) $_SERVER['SERVER_PORT'] === 80 ? '' : ':' . $_SERVER['SERVER_PORT']);
    }

    return null;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback