including a file inside a function
===

I have a function called get_header() which includes the header file in a template (a bit like wordpress), which is working. Also defined in my functions file is a stylesheetURL() function which gets the template's stylesheet url.

Inside my header.php file (in a subdirectory "design"), i'm calling stylesheetURL and PHP says it's undefined.

This is the structure:

pagehandler.php - handles page requests. Includes 'load.php' and then 'design/page.php'

load.php - includes 'functions.php' and classes.

functions.php - contains procedural functions like get_header and stylesheetURL. get_header actually includes the header.php file as an absolute url (http://website.com/design/header.php) inside the function, but because functions don't have scope, it should still call the stylesheeturl function fine.

page.php - calls function get_header(), echos content, then calls get_footer().

header.php - calls stylesheetURL(). << This is where it breaks. The header file is included fine, but doesn't have access to any of the functions. 

Why is this happening?