I'm including a header on every one of my pages using:
include("includes/layout/header.php");
I also have a set of functions in a file called fetch.php and I want to include it into the header file, since I need one of the functions for the script in the header (outputting some information). So, inside header.php I have the code:
include_once("/includes/common/functions/fetch.php");
And I get the error:
Warning: main(/includes/common/functions/fetch.php): failed to open stream: No such file or directory in /home/socialmo/public_html/includes/layout/header.php on line 27
Warning: main(): Failed opening '/includes/common/functions/fetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/socialmo/public_html/includes/layout/header.php on line 27
Any idea why this doesn't work, and what might be a good workaround? Thanks guys.