dirname(__FILE__)

The magic constant __DIR__ is only available as of PHP v.5.3.0