Looktrne Posted June 5, 2009 Share Posted June 5, 2009 My error log is showing this error: [04-Jun-2009 07:11:48] PHP Parse error: syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/meetan5/public_html/smartway/lib/system.lib(333) : eval()'d code on line 1 [04-Jun-2009 07:11:48] PHP Parse error: syntax error, unexpected ';', expecting T_VARIABLE or '$' in /home/meetan5/public_html/smartway/lib/system.lib(334) : eval()'d code on line 1 the code producing the error is inside a function here are the lines eval("global \$".strtolower((strpos($token, "[") ? substr($token, 0, strpos($token, "[")) : $token)).";"); eval("\$sVal = \$".strtolower($token).";"); could anyone let me know why this is throwing an error? thanks Paul Quote Link to comment Share on other sites More sharing options...
btherl Posted June 5, 2009 Share Posted June 5, 2009 Try putting your code in a variable, printing the variable and THEN calling eval on it. That way you can see what code you are trying to run. Eg $str = "print 'hello';"; print "Executing $str\n"; eval($str); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.