CodeIgniter Forums
Blank Page Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Blank Page Problem (/showthread.php?tid=9807)



Blank Page Problem - El Forum - 07-09-2008

[eluser]extra_rice[/eluser]
i've searched the entire forum but the solutions doesn't seem to work for me...

this is a function in my controller and the method redirect to user_list() gives me a blank white page...
Code:
function user()
    {
        $method = $this->uri->segment(3);
        $param = $this->uri->segment(4);
        
        if ( !empty($method) )
        {
            switch ( $method )
            {
                case 'login':
                    $this->user_login();
                break;

                case 'list':
                    $this->user_list($param); //param here is offset
                break;

            }
            
            exit;
        }
        else
        {
            $this->load->view('login');
        }
    }

    function user_list($offset=0)
    {
        $this->load->library('pagination');

        $cf['base_url'] = 'http://mysite.com/admin/user/list/';
        $cf['total_rows'] = $this->user->getCount();
        $cf['per_page'] = '10';

        $this->pagination->initialize($cf);

        $data['list'] = $this->user->getList(10, $offset);
        $data['count'] = $this->user->getCount();

        $this->load->view('list', $data);
    }

anybody know what im doing wrong?

UPDATE: when i do a http://mysite.com/admin/user_list/ it works... wonder why my current setup doesn't...


Blank Page Problem - El Forum - 07-09-2008

[eluser]Bramme[/eluser]
have you got error reporting on? Probably smth happens, but you're not getting an error.


Blank Page Problem - El Forum - 07-09-2008

[eluser]Chillahan[/eluser]
Not sure if this is of consequence, but I am experiencing bugs with class Pagination where it will generate a link that says "3", but when clicked, it brings me to page "4' (which doesn't exist!). Still debugging what this is (or deciding just to roll my own pagination - it doesn't really do too much except read what page you are on and generate a semi-acceptable page selector, after all - still have to roll your own "remember what page you were on" functionality, etc.).


Blank Page Problem - El Forum - 07-09-2008

[eluser]extra_rice[/eluser]
[quote author="Bramme" date="1215636048"]have you got error reporting on? Probably smth happens, but you're not getting an error.[/quote]

got my error reporting on... really don't know the problem is... =(


Blank Page Problem - El Forum - 07-10-2008

[eluser]JoostV[/eluser]
For debugging, add the follwing code to your controller just before you load the view:
Code:
echo '<pre>' . print_r[$data, true] . '</pre>';
This will tell you if your query is returning any data.


Blank Page Problem - El Forum - 07-10-2008

[eluser]extra_rice[/eluser]
[quote author="JoostV" date="1215688637"]For debugging, add the follwing code to your controller just before you load the view:
Code:
echo '<pre>' . print_r[$data, true] . '</pre>';
This will tell you if your query is returning any data.[/quote]

it's returning what it's supposed to return... i still can't figure out what's wrong... getting stuffed eating pan de sal and drinking kool aid while thinking of how to solve it... :-(


Blank Page Problem - El Forum - 07-10-2008

[eluser]extra_rice[/eluser]
i don't have a solution yet but i pinpointed the problem...

you can't do a load->view using my code... i don't know why... anybody got any ideas?