locate_template function – File not getting included

locate_template just returns the filename of the template. If you want to load the template, set the second argument to true:

locate_template( 'widgets/the-post-widget.php', true );

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