https://bugzilla.wikimedia.org/show_bug.cgi?id=46006

--- Comment #4 from T. Gries <[email protected]> ---
(copied from one of my sniplet archives)


$server = $_SERVER['SERVER_NAME'];
$remoteAddress = $_SERVER['REMOTE_ADDR'];

$pathParts = pathinfo( __FILE__ );
$scriptName = $pathParts['basename'];

function scriptUrl() {
    $pageUrl = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == "on" ) ?
'https://' : 'http://';
    $pageUrl .= $_SERVER['SERVER_PORT'] != '80' ? $_SERVER['SERVER_NAME'] . ":"
. $_SERVER['SERVER_PORT'] . $_SERVER['SCRIPT_NAME'] : $_SERVER['SERVER_NAME'] .
$_SERVER['SCRIPT_NAME'];
    return $pageUrl;
}
$imageBase = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'img' .
DIRECTORY_SEPARATOR;
$imageBaseUrl = str_replace( $scriptName, "", scriptUrl() ) . "img/";

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to