Re: Serious Problem: Eval'ing conditioned blocks!

From: Date: Mon, 10 May 2004 23:05:53 +0000
Subject: Re: Serious Problem: Eval'ing conditioned blocks!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34356@lists.php.net to get a copy of this message
I had something like this too. I used something other for the start and ending blocks. <# .... #> Then had a replace() section. > 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 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#34356) next »