note 18747 deleted from function.eval by nlopess

From: Date: Mon, 17 May 2004 18:54:36 +0000
Subject: note 18747 deleted from function.eval by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69733@lists.php.net to get a copy of this message
Note Submitter: mystran@wasteland.pp.htv.fi ---- It seems that the comment stating that you should prepend your string with <?php is wrong. (php4) For some reason one must add ?> before the actually php file content, but adding <?php will result in <?php being added to output sent to browser. eval('?>' . $dbcontent); // will parse the $dbcontent as php file eval('?>' . $dbcontent . '<?php'); /* same as above but ads "<?php" to the output */ also there is no need to use addslashes if you use this method.

« previous php.notes (#69733) next »