嗨,我有一个需要保存在 MYSQL 表中的下拉列表,这通过以下代码发生:
$pjt_table = 'music_fisica';
$full_pjt_save = array(
'physical_format_vinile' => $this->input->post('formato_vinile'),
);
$pjt_save = array(
'user_id' => $this->session->userdata('user_id'),
'id_acquisto' => $this->input->post('id_acquisto'),
'pjt_name' => $this->input->post('pjt_name'),
'pjt_type_name' => $pjt_table,
'pjt_table' => $pjt_table
);
//Full Project
$added_fields = $full_pjt_save+array('last_mod' => time());
$this->db->where('id_acquisto', $this->input->post('id_acquisto'));
//$this->db->set('physical_format_vinile', $this->input->post('formato_vinile'), FALSE);
$save_full_pjt_to_db = $this->db->update('progetti_'.$pjt_table, $added_fields);
$pjt_table_id = $this->db->insert_id();
$this->db->where('id_acquisto', $this->input->post('id_acquisto'));
$this->db->update('progetti', array('distrib_fisica' => '1'));
$exist_pjt = $this->db->get_where('progetti_'.$pjt_table, array('id_acquisto' => $this->input->post('id_acquisto')));
问题是下拉列表包含双引号,并在保存到表格时被截断。
而这45 Giri (7" Singolo, 45 Giri)
变成了这个45 Giri (7
。
我尝试更改配置添加双引号
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-\"';
但这并没有改变任何东西。我试过 XSS 过滤 false
$config['global_xss_filtering'] = FALSE;
这也不会改变任何事情。有什么建议吗?