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 Link to comment https://forums.phpfreaks.com/topic/161000-help-with-an-error-message/ 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); Link to comment https://forums.phpfreaks.com/topic/161000-help-with-an-error-message/#findComment-849704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.