NYCPHP Meetup

NYPHP.org

[nycphp-talk] eval;

Kyle Tuskey ktuskey at exostream.com
Sat Jun 22 21:09:21 EDT 2002


I think I misread your problem, so you can disregard my previous
response.  As for $str, eval() doesn't necessarily return a value.  If
you need to handle output buffer control, look into the ob_* functions.
I'd also like to suggest that you find a better way to do this.  Using
eval() on code from a db isn't the most efficient way of doing what you
want.


Kyle



-----Original Message-----
From: Ian Forsyth [mailto:ian at plusfour.org] 
Sent: Saturday, June 22, 2002 8:11 PM
To: NYPHP Talk
Subject: [nycphp-talk] eval;

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






More information about the talk mailing list