Log in

View Full Version : call a include() within eval()...


stryka
03-31-2003, 08:37 PM
UPDATED to include more details...

Is it possible to perform a include() in a .php file within an eval statement so all i have to do is refer it to the variable from eval() and the result appears?

Seems simple enough

I have a random gallery php file that i want to include in my custom NON-VB homepage that uses VB variables etc...

i should've prefaced this and said i am totally a newbie on this... juss looking at structure and seeing what might work... this php file creates 3 random pics... not just one variable... or result... see attached...

here's part of my index file...

eval("\$index_intro = \"".gettemplate('index_intro ')."\";");
eval("dooutput(\"".gettemplate('imix_index')."\");");

I want the results of the php file to appear within imix_index.. somehow... or within index_intro...

any suggestions...

filburt1
03-31-2003, 08:39 PM
Why would you want to eval an include? It won't make a difference...:confused:

g-force2k2
03-31-2003, 08:51 PM
stryka just include the file... and then any variables you can include in the templates to output the effect you're looking for...

just make sure you don't require the global.php twice...

regards,
g-force2k2