local host and port number in Server variable
<p>I have the following snippet that I am stuck at how to figure out getting the port number so the result might "turn" out correct as expected.</p>

<pre><code>$server_list = array(       
        "localhost:8282" =&gt; array("test" =&gt; FALSE, "site_id" =&gt; "flyToHeaven"),
);

$server_name = $_SERVER["SERVER_NAME"];
if (!isset($server_list[$server_name])) {
    $server_name = "unknown";
    print "unknown server name!!";
    exit();
</code></pre>

<p>i will always get "Unknown Server Name" in the output. If I delete the port number after localhost then the error is different, which means it passed this 'if' condition. Any help please ....</p>
