title: PHP - Getting URL from localhost and online
body: <p>OK, so localhost, I use <code>WAMP</code> and its <code>http://localhost/PROJECTNAME/</code> and online it's <code>http://PROJECTNAME.COM/</code></p>
  
  <p>So, by using</p>
  
  <p><code>&lt;?php echo "Load config file from: http://".$_SERVER['SERVER_NAME']?&gt;</code></p>
  
  <p>I get this running on <code>localhost/quiz</code>: <code>Load config file from: http://localhost</code> while running it online I get it correct.</p>
  
  <p>How would I get this URL to work both locally and online?</p>