3

どの出力にもこの文字 "´╗┐´╗┐" があるため、codeigniter フレームワークを使用しています。

//config.php

$config['charset'] = 'UTF-8';

私のプリント http://web.wipix.com.br/Capturar.PNG

/* Model */
public function AllVotos()
{
$this->load->dbutil();          
        
$select = $this->db->query("SELECT SUM(voto = '0') as insatisfatorio,   SUM(voto = '1') as bom, SUM(voto = '2') as excelente FROM qr_wiplay_participacoes ");

$config = array (
            'root'    => 'root',
            'element' => 'element',
            'newline' => "\n",
            'tab'     => "\t"
           );

return $this->dbutil->xml_from_result($select, $config);
}



/* Controller */

public function AllVotos(){

$xml = $this->home_model->AllVotos();
    
$this->output->set_content_type('text/xml');

$this->output->set_output($xml); 


}
4

1 に答える 1