PDA

View Full Version : PHP includes in the vb templates


The Keeper
03-24-2002, 05:02 AM
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
03-24-2002, 05:56 AM
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
03-24-2002, 06:35 AM
nope.
seems php isn't recognised at all.

JoeHarrison
04-30-2002, 01:23 AM
This is exactly what I was searching for... and it works great!!!

Thanks FWC!

-Joe

djkiruban
07-11-2006, 08:33 AM
ob_start();
require("file.php");
$file = ob_get_contents();
ob_end_clean()

i put that where? global.php ?

Paul M
07-11-2006, 12:12 PM
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
07-11-2006, 04:30 PM
How would you do this in the latest stable version..