vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   eval parse error. (https://vborg.vbsupport.ru/showthread.php?t=62106)

Neo 03-02-2004 06:20 PM

eval parse error.
 
I get this error when I try to run this code in vb3.

Error:
Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\vb3\tutorials.php(136) : eval()'d code on line 5

Code:
eval('print_output("' . fetch_template('games_view') . '");');

It looks correct to me, but I get a error non the less. If anyone can help me that would be great.

Thanks for your time
- Neo Ninja :ninja:

Zachery 03-02-2004 06:21 PM

Quote:

Originally Posted by Neo
I get this error when I try to run this code in vb3.

Error:
Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\vb3\tutorials.php(136) : eval()'d code on line 5

Code:
eval('print_output("' . fetch_template('games_view') . '");');

It looks correct to me, but I get a error non the less. If anyone can help me that would be great.

Thanks for your time
- Neo Ninja :ninja:

That means the template games_view on line 136 has somthing wrong with it :)

assassingod 03-02-2004 06:54 PM

Edit:
Your code is right, what's on line 5? Is there any lines above it that have a missing ' or ;

Dean C 03-02-2004 07:00 PM

I'd say you've got a $var['key'] somewhere in your template :) You can't quote your keys in templates unless their inside an if condition tag :)

Link14716 03-02-2004 07:25 PM

Quote:

Originally Posted by Dean C
I'd say you've got a $var['key'] somewhere in your template :) You can't quote your keys in templates unless their inside an if condition tag :)

I get that a lot. :p

Dean C 03-02-2004 07:57 PM

Yep me too - as you write more and more code you can pinpoint these errors in seconds :)

Neo 03-02-2004 10:11 PM

Quote:

Originally Posted by Dean C
I'd say you've got a $var['key'] somewhere in your template :) You can't quote your keys in templates unless their inside an if condition tag :)

Man I really really hate vb3.

Can you explain this a little better for me?

Link14716 03-02-2004 10:13 PM

It has nothing to do with vB3, you'd get that error in a vB2 template, or any template for that matter.

In the templates, unless in an <if> condition., variables with keys must be like $var[key] and not $var['key'].

Neo 03-03-2004 01:00 AM

ok, so I just checked the template, and there is nothing in the template itself.. and I have always used $var[key] with vb templates.

Zachery 03-03-2004 03:10 AM

Can you paste the template here for us?


All times are GMT. The time now is 08:49 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
  • Page Generation 0.01694 seconds
  • Memory Usage 1,727KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete