![]() |
How do I include a php file in VB templates?
I have tried the instructions given here
So I created a plugin with global_start and added this ob_start(); include('/random/RanCon.php'); $includedphp = ob_get_contents(); ob_end_clean(); And in the postbit legacy template I added $includedphp BUT , All i get is blank space where the output of the php file should be. I think its the wrong path that I am using in the include statement.. can anyone tell me what the correct path should be? Forum is at www.domain.com/forum PHP file is at www.domain.com/forum/random/RanCon.php Server path is /domain.com/public_html/forum/random Help! |
Try without the leading /
|
Hey wetwired.. got the path.. it worked WITH the leading / - just had to add a public_html in between.
Anyways the $includephp variable seems only to be working in certain templates and NOT working in others. Example - works in navbar, but does not in postbit_legacy!! Discussion continued here - http://www.vbulletin.com/forum/showthread.php?t=222313 |
In postbit_legacy, you'll need to use $GLOBALS[includephp] .
This is because postbit_legacy is processed inside of a function, so only specific globals are available there. |
All times are GMT. The time now is 02:25 PM. |
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:
|