![]() |
php include what am i doing wrong
ok so i read http://www.vbulletin.com/docs/html/t..._externalfiles
and i followed it and this is my plugin ob_start(); include('banners/showbanner.php'); $justinbanner = ob_get_contents(); ob_end_clean(); however im getting errors such as Fatal error: Call to a member function query_read_slave() on a non-object in /home/beta/public_html/index.php on line 394 any ideas? thanks |
One idea would be to look at the showbanner.php file and see if $db->query_read_slave or $vbulletin->db->query_read_slave appears within a function. If so, globalize $db or $vbulletin near the beginning of the function:
Code:
global $db; |
i figured it out... i had no idea that you couldnt do normal php mysql syntax... didnt know i had to use $db->query and what not.. after i converted the page to the vb syntax all worked fine
|
It's called OOP (Object Orientated Programming). vBulletin's structure utilises the available OOP features in PHP 4. I suggest you have a read of what it's about.
|
All times are GMT. The time now is 08:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|