title: How can get the current path in PHP
body: <p>How can I return the path of the current page including whats after ?</p>
  
  <p>So for example I am this link</p>
  
  <pre><code>localhost/site1/index.php?view=10&amp;user=5
  </code></pre>
  
  <p>I want to return this value <code>"index.php?view=10&amp;user=5"</code></p>
  
  <p>How can I do that using PHP?</p>
  
  <p>I thought <code>$_SERVER['SCRIPT_NAME']</code> do this but <code>SCRIPT_NAME</code> is returing index.php</p>