View Full Version : How to add a php include
mcyates
08-22-2005, 02:49 PM
How do i include a php file in the header of the forum? (VB3.5 RC2)
I have inserted this but nothing happens
<?php include("http://www.myfootballforum.com/banners/showbanner.php"); ?>
Andreas
08-22-2005, 02:50 PM
3.0.x or 3.5?
The best way to do this would be through a plugin.
Go to "Add Plugin", and put in your php code (without the <?php ?>), and hook it onto global_start.
mcyates
08-22-2005, 03:00 PM
i'm unsure as i've never done this before
I received an error:
Warning: mysql_connect(): Access denied for user: 'myfootba@localhost' (Using password: NO) in /includes/functions.php(4191) : eval()'d code on line 69
Die Verbindung zum MySQL-Datenbankserver ist fehlgeschlagen
The opening and closing php tags are not needed in the phpinclude templates.
Andreas
08-22-2005, 03:41 PM
@mcyates
If your Include uses mySQL, make sure
a) The Tables are in the same Database as vBulletin
OR
b) It uses another Username/Password
OR
c) It opens a new connection
mcyates
08-22-2005, 06:54 PM
@mcyates
If your Include uses mySQL, make sure
a) The Tables are in the same Database as vBulletin
OR
b) It uses another Username/Password
OR
c) It opens a new connection
thank you.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.