Get parent folder of current file PHP
<p>I've done quite a bit of searching for this, so I'm sorry if this is a dupe. <Br/>
Anyway, I need to get the name of the folder the current file is in. For example, I want to convert something like <code>example.com/folder/subfolder/file.php</code> to <code>subfolder</code>.<br/> My current code is <code>dirname($_SERVER['PHP_SELF'])</code>, but that returns <code>/folder/subfolder</code> instead of <code>subfolder</code>. Thank you!</p>
