![]() |
$code getting parsed ?
I'm stumped. (Using VB3.6.8)
I have this code: <? $pollid="1"; include("poll.php"); ?> That when ran by itself outside of VB (in a test.php file) will produce the results just fine. However when inserted in one of my templates it does NOT produce an output and when I look at the source code(using IE) all I see is this: <? ="1"; include("poll.php"); ?> Like it parsed the $pollid I have tried it on different templates in different places with no luck. No matter what template it's in, it will not output. How do I get my template to run the the full code and not parse it out so my poll will show ? Please tell me this is easy...:o Thanks everyone. 74 |
You can't put php in templates, you must use plugins.
|
|
Well I thought I was on to something. I looked over the Doc (thanks Marco) and did what the example said. Now it appers the plugin cant find the file ?? I double checked everything and the path statements are correct and the folder is 777. I going to keep digging, but in the mean time I thought I would post my progress. This is what I'm getting now.
Warning: Unknown(/forum/simplepoll/sample.php): failed to open stream: No such file or directory in /global.php(360) : eval()'d code on line 62 Warning: Unknown(/forum/simplepoll/sample.php): failed to open stream: No such file or directory in /global.php(360) : eval()'d code on line 62 Warning: (null)(): Failed opening '/forum/simplepoll/sample.php' for inclusion (include_path='.:/usr/local/lib/php') in /global.php(360) : eval()'d code on line 62 Here is my Plugin ob_start(); include('/forum/simplepoll/sample.php'); $includedphp = ob_get_contents(); ob_end_clean(); and its in Global_Start |
Isn't your forum already in the /forum/ directory?
|
Yeah Your right. It is a problem with the path. It worked when I specified the http:// location of the file so What is the forum root ?
|
global_start means the code will be executed in the global.php file.
I'm assuming you have it set up like this:
You don't need to use http:// something like: Code:
include('./simplepoll/sample.php'); |
All times are GMT. The time now is 03:38 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:
|