We are currently busy developing an online press application, which makes
use of templates & renderers.
The system works as follows template->renderer->renderer parameters.
The renderer does business logic, making variables available for the
template, which simply renderers the variables
to html, using variables embedded in html e.g. <DIV CLASS="headline"><?=
These renderers can also have parameters, which are basically user-definable
variables e.g. a user can create the
parameter called $__HEADLINE__?> with the parameter value of e.g.
This will thus be evaluated by the rendering engine as '$__HEADLINE__ =
Fnally, my question:
These renderer parameters are added using a html form interface and then
stored in a database.
Can anyone suggest a way of evaluating code on form submission, checking for
parse errors etc.
I know most programmers would frown at the idea of evaluating user code, but
the enviroment it will be running in will be a secure intranet etc.
Ideally, i'd like to evaluate the code the user has submitted, and if an
error is generated, notify the user of that fact.
Eval always returns false, and I'd like no runtime error to be generated.
Perhaps an error-handler is what's needed?
What can you suggest?
+27 82 4918021
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php