[nycphp-talk] eval;
Ian Forsyth
ian at plusfour.org
Mon Jun 24 11:36:20 EDT 2002
Thanks,
that worked perfectly. So in my code I do..
eval($row['content']);
then in the space where I want the content to be echoed, i do echo $output;
regards
Ian
> -----Original Message-----
> From: Kayra Otaner [mailto:kayraotaner at yahoo.com]
> Sent: Sunday, June 23, 2002 9:21 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] eval;
>
>
> Did you try to start output buffering in the code that you used
> in eval function? I think it may
> work. Simply replace your code with output buffered version :
>
> ob_start();
> echo "hello";
> $output = ob_get_contents();
> ob_end_clean();
>
> and then echo $output for echoing content of your php code stored
> in database.
>
> Kayra Otaner
>
>
> --- Ian Forsyth <ian at plusfour.org> wrote:
> > I am setting a basic CMS type thing.
> >
> > Speediness aside, I am storing any all content in the db.
> >
> > Basically i am trying to store php in the db that I want to do
> and eval();
> > on. To get started I inserted the following into the db -
> >
> > echo "hello";
> >
> > and am doing the following for the result set
> >
> > $str = eval($row['content']);
> >
> > question-
> >
> > Storing the value in $str does nothing and output buffering
> didn't seem to
> > work; how can i control where the eval gets spit out?
> >
> > I have read about doing addslashes and stripslashes, but that
> does not seem
> > to work in my case....
> >
> > regards,
> > Ian
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
>
More information about the talk
mailing list