PHP detect if in subdirectory
<p>I want to determine if the PHP file I am on <code>install.php</code> is in a subdomain/subdirectory (basically not at domain.com/install.php).</p>

<h2>Found solution to my problems</h2>

<p>see below</p>
