I can get the dir/url of a plugin’s file by using:
$plugin_dir_path = plugin_dir_path(__FILE__);
$plugin_dir_url = plugin_dir_url(__FILE__);
However, if the file calling the above codes are in a subdir such as ./includes, the the subdir will also be returned, like this:
/xxx/wp-content/plugins/file-converter/includes/
How to get the root dir of the plugin without the subdir? i.e. /xxx/wp-content/plugins/file-converter/