Is there a recommended way to handle path issues when including PHP libraries like PHPMailer in PHP scripts?

When including PHP libraries like PHPMailer in PHP scripts, it's recommended to use the `__DIR__` constant to ensure that the paths to the included files are resolved correctly. This constant provides the absolute path of the directory of the current script, allowing for consistent file inclusions across different directories.

require_once __DIR__ . '/path/to/PHPMailer/PHPMailer.php';
require_once __DIR__ . '/path/to/PHPMailer/SMTP.php';
require_once __DIR__ . '/path/to/PHPMailer/Exception.php';