NYCPHP Meetup

[nycphp-talk] eval;

Kyle Tuskey ktuskey at exostream.com
Sat Jun 22 20:30:44 EDT 2002


You don't need to eval(), in fact you shouldn't use it as it is a waste
of code and resources.

$str = $row["content"];  // this will work


Why even assign it to a new var in the first place unless you plan on
editing one and want a copy.

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