Use the WordPress core function that's designed specifically for that purpose:
<?php plugin_dir_path( __FILE__ ); ?>
See the Codex documentation here.
You also have
<?php plugin_dir_url( __FILE__ ); ?>
if what you're looking for is a URI as opposed to a server path.
See the Codex documentation here.
IMO, it's always best to use the highest-level method that's available in core, and this is it. It makes your code more future-proof.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…