如何解决“找不到对象!” codeigniter控制中的错误 [英] How to resolve "Object not found!" error in codeigniter control

查看:759
本文介绍了如何解决“找不到对象!” codeigniter控制中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在以下代码中遇到错误:

I get an error in the following code:

if(count($q_cek_login->result())>0)
{
    foreach($q_cek_login->result() as $qck)
    {

        if($qck->ID_JABATAN==1)
        {
            foreach($q_cek_login->result() as $qad)
            {
                $sess_data['logged_in'] = 'yesGetMeLogin';
                $sess_data['username'] = $qad->USERNAME;
                $sess_data['nama'] = $qad->NAMA;
                $sess_data['id_jabatan'] = $qad->ID_JABATAN;
                $this->session->set_userdata($sess_data);
            }

            header('location:'.base_url().'transaksi/pending');
        }
        else
        {
            echo "halo";
        }
    }
}

错误:


找不到对象!

Object not found!

在此服务器上找不到请求的URL。引荐页面上的链接似乎错误或过期。请通知该页面的作者该错误。

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

如果您认为这是一个服务器错误,请与网站管理员联系。

If you think this is a server error, please contact the webmaster.

错误404

localhost
11/05/13 13:45:53
Apache / 2.2.21(Win32)mod_ssl /2.2.21 OpenSSL / 1.0.0e PHP / 5.3.8 mod_perl / 2.0.4 Perl / v5.10.1

localhost 11/05/13 13:45:53 Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1


推荐答案

尝试使用

redirect(site_url('transaksi/pending'));

而不是

header('location:'.base_url().'transaksi/pending');

另请注意,base_url不包含index.php,其中site_url包含

Also note that base_url does not contain index.php which site_url contains

这篇关于如何解决“找不到对象!” codeigniter控制中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆