note 18084 deleted from function.eval by nlopess
| From: | nlopess@php.net | Date: | Mon, 17 May 2004 18:53:25 +0000 |
| Subject: | note 18084 deleted from function.eval by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-69732@lists.php.net to get a copy of this message | ||
Note Submitter:
----
The previous comment would imply to me that you must also add '<?php' after $string in
the eval function, so that your original file may continue with additional php code after the eval()
So...
--- file: example.php ---
<?php phpinfo(); ?>
--- file: mypage.php ---
<?php
$string = implode ('', @file('example.php'));
// Massage the contents of $string however you want.
eval ('?>' . $string . '<?php');
// Additional code continues...
$allWorldProblems = "cured";
... etc
?>