So, in the database field there is a php function. Here's what it looks like:
'$put_fname_fn = function($filename) {
return $filename.'.Z';
};'
I execute it as follows:
$code = fetchFromDatabase();
eval($code);
$put_fname_fn('MYFILE.TXT');
Is there a more graceful way to call a user-defined function? I try to avoid using eval, but I have no other way to do this.
PaulS source
share