I am making a plugin only for myself. But I want to include a php file outside this plugin. I want to try to include wp-config.php, I also want to try to include a php file in my theme folder. How can I do that? I am using wordpress.
To use WP's core functions you should include the wp-load.php file
require_once('wp-load.php');
To use vars saved in the the wp config you can use the method above or just use
require_once('wp-config.php');
Files in your theme you should render with get_template_part if they are template files.
http://codex.wordpress.org/Function_Reference/get_template_part