excerpt display same text

You need to be using setup_postdata($post); as in all of the examples for get_posts. You need:

$myposts = get_posts('numberposts=5');
foreach($myposts as $post) :
    setup_postdata($post);
    // the rest of your function

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