gpt4 book ai didi

php - Codeigniter + Chrome 错误 (ERR_RESPONSE_HEADERS_TOO_BIG)。怎么解决?

转载 作者:行者123 更新时间:2023-12-04 09:41:05 24 4
gpt4 key购买 nike

我使用 CodeIgniter 1.7 开发的网络应用程序在仅使用 Chrome 浏览器打开时出现错误 ERR_RESPONSE_HEADERS_TOO_BIG。我试过所有其他浏览器都不会发生错误。

刷新错误页面后,我可以正常打开页面。我尝试从 Google 搜索,似乎这个错误自 2009 年以来一直发生在 Chrome 用户身上。

这是我的 Controller 代码:

function search_daily_sales_summary_view()
{
if(!($this->session->userdata('DAILY_SALES_SUMMARY'))){
$this->session->set_flashdata('error', 'You dont have the permission to access that page.');
redirect('login/home');
}

$this->load->model('currency_model');
$this->load->model('bill_model');

$data = array();

$report = array();

if($query = $this->currency_model->list_currency())
{
foreach ($query as $row) {

$currencyid = $row->CURRENCY_ID;
$currencycode = $row->CURRENCY_CODE;

if($buyData = $this->bill_model->calculate_buy($currencyid))
{
$totalbuy = $buyData->total_from_amount;
$totalbuy_rate = $buyData->rate;

if($buyData->total_from_amount=='')
{
$totalbuy = 0.00;
}

if($buyData->rate=='')
{
$totalbuy_rate = 0.00;
}
}
else
{
$totalbuy = 0.00;
$totalbuy_rate = 0.00;
}

if($sellData = $this->bill_model->calculate_sell($currencyid))
{
$totalsell = $sellData->total_from_amount;
$totalsell_rate = $sellData->rate;

if($sellData->total_from_amount=='')
{
$totalsell = 0.00;
}

if($sellData->rate=='')
{
$totalsell_rate = 0.00;
}

}
else
{
$totalsell = 0.00;
$totalsell_rate = 0.00;
}

$report[] = array("currency"=>$currencycode, "buy"=>$totalbuy, "buyrate"=>$totalbuy_rate, "sell"=>$totalsell, "sellrate"=>$totalsell_rate);

}

$data['records'] = $report;

}

$this->load->model('company_model');
if($query = $this->company_model->list_company())
{
$data['company_list'] = $query;
}

$this->load->model('branch_model');
if($this->input->post('company'))
{
$companyid = $this->input->post('company');

if($query = $this->branch_model->view_company_branch($companyid))
{
$data['branch_list'] = $query;
}
}
else
{
if($query = $this->branch_model->list_branch())
{
$data['branch_list'] = $query;
}
}

$this->load->view('report/daily_sales_summary', $data);

}

如何解决?

最佳答案

CI 将 session 存储在 cookie 中。如果您在 cookie 中存储太多内容,就会出错。

将 CodeIgniter 设置为使用数据库 session ,或者将其保存到文件中。

关于php - Codeigniter + Chrome 错误 (ERR_RESPONSE_HEADERS_TOO_BIG)。怎么解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6260503/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com