note 15587 added to function.eval

From: Date: Fri, 21 Sep 2001 13:02:48 +0000
Subject: note 15587 added to function.eval
Groups: php.notes 
Request: Send a blank email to php-notes+get-18140@lists.php.net to get a copy of this message
You have to buffer the eval output if you want to capture it to save to a file: <CODE> // $template is a mixture of html and php variables that need to be eval'ed $html = join (" ",file ($template)); ob_start(); eval ( "?>" . $html . "<?"); $output = ob_get_contents (); ob_end_clean(); </CODE> Now the variable $output can be written to a file!! Cheers! http://www.php.net/manual/en/function.eval.php

« previous php.notes (#18140) next »