protocol ()

Returns the protocol 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 (4 lines) | View on GitHub

public static function protocol()
{
    return (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) === 'on') ? 'https://' : 'http://';
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback