Synchro/PHPMailer — pull request #26 by Chofoteddy (2013-02-15 07:44:29+00:00)
Title: PATH directory

Using constant "__DIR__" is helpful when using the class as an extension of a application framework, such as integration with Yii (http://www.yiiframework.com/).

Example:

require_once $this->PluginDir . 'class.smtp.php'; // require_once(class.smtp.php): failed to open stream: No such file or directory

require_once __DIR__ . $this->PluginDir . '/class.smtp.php'; // Success (/var/www/project/protected/extensions/class.smtp.php)