Serious Problem: Eval'ing conditioned blocks!
| From: | Florian Wagner | Date: | Mon, 10 May 2004 21:51:41 +0000 |
| Subject: | Serious Problem: Eval'ing conditioned blocks! | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34354@lists.php.net to get a copy of this message | ||
Hi there,
I (still :-) ) have the code of my php pages stored in a database. A main
page parses this code using the "eval_html" function postet at php.net. This
used to work fine, but then I tried to employ conditioned blocks, e.g.
<? while (foo) { ?>
<p>Hello World</p>
<? }?>
The function I use seperates this code in three parts (1st: <? while (foo)
{ ?>) and tries to eval every single one. This of course causes an error
because neither "while (foo) {" nor "}" is valid statement.
Anybody knows a workaround (that doesn't mean putting all HTML output in PHP
"echo" commands) ??
Thanks