PHP $_SERVER and urls?
<p>How can I get my full current url in php but minus all querystrings?</p>

<p><strong>Example</strong></p>

<pre><code>echo 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
</code></pre>

<p>Would echo something like assuming query strings were in place...</p>

<pre><code>http://www.example.com/example?tab=foo&amp;dslip=yes
</code></pre>

<p>How can I get the same as above but cut off all the query strings?</p>

<p>How is this done in php.</p>

<p>Thanks.</p>
