Include a file that has a function in it

This was a tough one to figure out, but I finally got it to work. You have to use locate_template to build the url like so:

include(locate_template('codesnippet.php'));

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