Hi, in my page, I want to store php code in a database and run them selectively. One way I can think of is to use include():
Step 1) Fetch $scriptfilename from database
Step 2) include($scriptfilename);
I suppose if I do it like this, the php would run a code block depending on the scriptfilename stored in the database. The problem here is that the actual code is not stored in the database but as a separate php file.
Is there a php command like:
runasphpcode( $code );
that can run a string as a block of php code ? How would you do it in other (simpler) ways ?
- Thanks
EDIT: Thanks, deadimp
[Edited by - Wai on June 16, 2007 11:24:21 AM]