Hi hveld,
Well. The goal is parsing the php code. Right now it is in a string, but you want it to actually be read by the server.
The problem is require and include functions all take files as objects.
I finally found something that will work!!! eval()
http://www.php.net/manual/
The php.net docs say:
"eval() evaluates the string given in code_str as PHP code. Among other things, this can be useful for storing code in a database text field for later execution."
How perfect is that!
Joe P
Main Topics
Browse All Topics





by: gamebitsPosted on 2006-04-22 at 17:09:31ID: 16517081
USe the eval function, evaluate a string as a PHP code.
n/function .eval.php
you query the db to get the code snipet you echo it as a string and using the eval function php will run the code.
more info here
http://ca.php.net/manual/e
Gamebits