 <p>You may be able to parse it from the <code>__FILE__</code> <a href="http://php.net/manual/en/language.constants.predefined.php">magic constant</a>. I don't have any Windows computer, but I guess it will be the first character. So this may work:</p> <pre><code>$drive = substr(__FILE__, 0, 1); </code></pre>