【问题标题】:Redirect function is working properly in localhost.but it's not working in live server [duplicate]重定向功能在本地主机中正常工作。但它在实时服务器中不起作用[重复]
【发布时间】:2019-11-25 10:05:39
【问题描述】:
public function delete_app()
{
    $id=$this->uri->segment(3);
    $this->db->set('is_delete',1);
    $this->db->where('id',$id);
    $this->db->update('app');
    redirect("main_controller/display_app/-2");
}

【问题讨论】:

  • 你确定不需要 header("Location:...");在这里?
  • 标头功能正在运行。但我只想知道为什么重定向功能在那里不起作用。 @RussJ
  • 我认为PHP中没有“redirect”这样的关键字。

标签: codeigniter


【解决方案1】:

redirect 驻留在 URL 帮助程序中,因此在您加载它时假设它。 您可以使用位置或刷新,但有时位置在工作时会出现问题。

试试这个:- redirect('/account/login', '刷新');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-06
    • 2020-03-31
    • 1970-01-01
    • 1970-01-01
    • 2018-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多