我正在查看表达式引擎save_entry函数的文档,并试图了解可能的参数。什么是'field_ft_‘?可能的值是什么?
从文档中:
ee()->load->library('api');
ee()->api->instantiate('channel_entries');
ee()->api->instantiate('channel_fields');
$data = array(
'title' => 'Breaking News Story!',
'entry_date' => '1256953732',
'edit_date' => '1351653729',
'field_id_6' => 'Some data',
'field_ft_6' => 'none',
'field_id_19' => 'More data',
'field_ft_19' => 'xhtml'
);
ee()->api_channel_fields->setup_entry_settings($channel_id, $data);
$success = ee()->api_channel_entries->save_entry($data, $channel_id);
if ( ! $success)
{
show_error(implode('<br />', $this->api_channel_entries->errors));
}发布于 2015-01-21 02:27:39
当你在表达式引擎中创建一个字段时,你给它分配了一个默认的“字段类型”。
在某些情况下,单个条目可以使用默认字段类型以外的字段类型。
有一个表exp_fieldtypes,其中列出了字段类型。我没有看到xhtml或者根本没有,它们都内置在EE中。也许默认的不包括在内?也许有人可以改进这个答案。
https://stackoverflow.com/questions/28051783
复制相似问题