php - View is spitting out strange data in codeigniter -
i have never seen problem before in codeigniter.
i have simple controller:
public function port($table) { error_reporting(1); $data['table_name'] = $table; $data['am_data'] = $this->charts_model->sp_vs_basic_portfolio($data); $data['fuck'] = $this->charts_model->get_ajax_portfolio_data($data); $data['first_portfolio'] = $table; $data['second_portfolio'] = $table . ' hardline'; $data['monthly'] = $this->charts_model->get_portfolio_monthly_returns($data); $data['annual'] = $this->charts_model->get_portfolio_annual_returns($data); $data['piechart'] = $this->charts_model->build_piechart($data); var_dump($data); die; $this->load->view('portfolio_new/portfolio_new_view', $data); } so can see in controller, dump data , die; working fine. data wanted there. when go view, bunch of: �+��n���.nikr)�i��u3
so made simple view no variables <?php echo "hello world"; ?> , similar result. have other views , controllers working fine on site.
portfolio_new_view.php =
<?php echo "hello world"; ?>
you might have code editor saving in ansi. hope code not edited in notepad , saved. happens somethings since default encoding ansi.
another possibility moved pc/os
add view file
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> update part of config.php
$config['charset'] = 'utf-8'; and set editor save files utf-8 ?
if it's none of above , have utf-8 set everywhere, might want create new view file or test on code on machine.
Comments
Post a Comment