How to set active class to the menu of any page coming from a single.php template

Update: Here is the answer:

<?php if(is_single()) echo 'active'; ?>

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