note 18051 deleted from function.eval by nlopess

From: Date: Mon, 17 May 2004 18:53:00 +0000
Subject: note 18051 deleted from function.eval by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69731@lists.php.net to get a copy of this message
Note Submitter: roland@astrofoto.org ---- If you are trying to eval() somehthing which is a fully-formed PHP file, you will need to prepend '?>' to the string. For example, if you have a script mypage.php which loads example.php and evaluate it: --- file: example.php --- <?php phpinfo(); ?> --- file: mypage.php --- <?php $string = implode ('', @file('example.php')); // Massage the contents of $string however you want. eval ('?>' . $string); ?>

« previous php.notes (#69731) next »