Call to require(‘../../../wp-blog-header.php’) results in 404 error?

It is not a 404 error, it’s a server error. You are calling is_user_logged_in and current_user_can probably before the definition is loaded. Hook your check to an action where these functions are known, admin_init for example.

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