vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   call a include() within eval()... (https://vborg.vbsupport.ru/showthread.php?t=51042)

stryka 03-31-2003 08:37 PM

call a include() within eval()...
 
1 Attachment(s)
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


All times are GMT. The time now is 10:51 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
  • Page Generation 0.01030 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete