Both are acceptable but not recommended. Use locate_template()
instead because a child theme can overwrite the loaded file then.
Example:
$found = locate_template( 'functions/my-custom-widget.php', TRUE, TRUE );
The first TRUE
tells WordPress not only to search for the file but to load it actually. The second makes it a require_once
call.
The function return the path to the located file in case you need it later. If nothing is found it returns an empty string.