Stop unauthorised file access

You can use this code on top of your file and apply your role condition if required :

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

For more details follow this link and other one !

Hope this will help.

For more details where to use

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