/** * 根据值,返回文本或者HTML * $node 节点 * $value 值 $type 返回类型 txt 文本 html 带颜色属性的HTML文本 */ public static function get_field_str($node, $value, $type = '') { $field = vars::get_field($node, $value); //print_r($field); if ($type == 'txt') { return $field['txt']; } else { return '<font color="' . $field['txt_color'] . '">' . $field['txt'] . '</font>'; } }