PDA

View Full Version : Including a file in a template...


nando99
09-06-2008, 04:14 AM
I've read how to do it and I'm pretty sure I did it right.... I mean, I know its doing something because it gives me an errror..lol

Hook Location:
global_start

Execution Order:
5

Plugin PHP Code:
ob_start();
include('home/fatboy99/public_html/templatefiles/arcadeheader.php');
$arcadeheader = ob_get_contents();
ob_end_clean();


I get this error:
Warning: include(home/fatboy99/public_html/templatefiles/arcadeheader.php) [function.include]: failed to open stream: No such file or directory in [path]/global.php(404) : eval()'d code on line 105

Warning: include(home/fatboy99/public_html/templatefiles/arcadeheader.php) [function.include]: failed to open stream: No such file or directory in [path]/global.php(404) : eval()'d code on line 105

Warning: include() [function.include]: Failed opening 'home/fatboy99/public_html/templatefiles/arcadeheader.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(404) : eval()'d code on line 105

The file exists: http://www.fatboymagazine.com/templatefiles/arcadeheader.php

I added $arcadeheader to the header template.

Not sure what I've done wrong - its prolly something simple I missed or not... Not sure... Any help is appreciated - thanks in advance....

SEOvB
09-06-2008, 04:46 AM
the error being generated says you've got a path wrong. try

include('/home/fatboy99/public_html/templatefiles/arcadeheader.php');

Note the first slash before home

Opserty
09-06-2008, 08:01 AM
Isn't you're forum already in the "/home/fatboy99/public_html/" directory?

So something like:

include('./templatefiles/arcadeheader.php');

Would probably work better...

nando99
09-06-2008, 06:39 PM
Isn't you're forum already in the "/home/fatboy99/public_html/" directory?

So something like:

include('./templatefiles/arcadeheader.php');

Would probably work better...


wow - duh! that worked... thanks!