子文件夹的PHP文档根目录

I know how to play with __DIR__ or DIRECTORY_SEPARATOR in PHP. it works well if files or folders are in root server directory for example inetpub. But my question is how to operate in subfolder directory? Example

inetpub->subfolder
         subfolder->classes
         subfolder->themes
         subfolder->index.php

define ('URL', '/');
<a href='. URL . 'logout.php >LogOut</a>

Script jumps into inetpub/logout.php should be my subfolder->logout.php