Hi, I have an eval which evaluate a block of code before echo the result on the screen.. Here is the func :
function t_eval($texte) { ob_start(); eval("?>".$texte); $retval = ob_get_contents(); ob_end_clean(); return $retval; } But I use some objects for databases, ... and when i trying to execute this code i have this text. Fatal error: Call to a member function on a non-object in k:\program files\easyphp\www\dhea\include\php\functions_conversion.inc.php(23) : eval()'d code on line 9 What to do ? I've tried to insert a global in t_eval function and do the following code eval("<?php GLOBAL $myclasses; ?>".$texte); Thanx Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php