我的数据库中存储了一个函数名,但是当我尝试调用它时出现语法错误。
$downloads = $wpdb->get_results( "SELECT function_name FROM master_download" );
foreach( $downloads as $download ) :
$function_name = $download->function_name;
eval( $function_name );
endforeach;
db中的值是:
csv_upload_measure_custom( $cell, $measure, $measure_start, $measure_end, $loc_id )
错误代码:
解析错误:语法错误,/nas/content/staging/justreport/wp-content/themes/yardstick/template-data.php(373)中的意外文件结尾:第1行的eval()代码< / p>
请有人帮我解决我做错的事吗?