How do I get slug of all active plugins programmatically?

Use option active_plugins to get all plugin init files. e.g.

$current = get_option( 'active_plugins', array() );
// print_r( $current );

Here, htmlpress is the plugin slug.

enter image description here

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