PDA

View Full Version : PHP includes in the vb templates


The Keeper
24 Mar 2002, 06:02
Hi I put this in my template:

<?php include("file.php"); ?>

however it's not being done

how would one include a php file onto the main page?

FWC
24 Mar 2002, 06:56
Try something like this:
ob_start();
require("file.php");
$file = ob_get_contents();
ob_end_clean(); Then put $file wherever you want on your page.

The Keeper
24 Mar 2002, 07:35
nope.
seems php isn't recognised at all.

JoeHarrison
30 Apr 2002, 02:23
This is exactly what I was searching for... and it works great!!!

Thanks FWC!

-Joe

djkiruban
11 Jul 2006, 09:33
ob_start();
require("file.php");
$file = ob_get_contents();
ob_end_clean()

i put that where? global.php ?

Paul M
11 Jul 2006, 13:12
This thread is four years old !

How you would do it depends on what version of vB, but you can't put php in templates.

SKNY
11 Jul 2006, 17:30
How would you do this in the latest stable version..