Access to the template file of a plug-in

maybe dirty, but it works:

$slug = $_SERVER['REQUEST_URI'];
$slug = explode("https://wordpress.stackexchange.com/", $slug);
$slug = array_filter($slug);
$slug = end($slug);
if ($slug == 'myplugin') {
    include(__DIR__.'/theme/index.php');
    exit;
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)