Welcome Guest, Not a member yet? Register   Sign In
Blank Views - head scratcher
#1

[eluser]techgnome[/eluser]
quick into - I'm a programmer by trade, and I've been doing php development off and on for a number of years... I'm not exactly what you would call a noob when it comes to this. -- I mention this so you don't feel the need to talk to me like a 3-year old... I'm at least 5... Wink

And I did search the forums, saw similar, but not exactly the same problem, and I've done some initial troubleshooting and have narrowed down where the problem lies... but I cannot for the life of me figure out the WHY.

Here's the setup: (ignore caps... force of habbit)

root
root \ application
root \ application \ Controllers
root \ application \ Views
root \ application \ Views \ Includes

So, my controller, "view" is in the controllers folder... that seems to work.. there's an index function and others...
the includes contains my header, navigation, sidebar, and other common view files... in the view folder are all of the views ports that make up the main content section.

Within the includes folder is "template.php" and it looks like this:
Code:
<?php
    $this->load->view('includes/_header_view');
    $this->load->view('includes/_quicklinks_view');
    $this->load->view('includes/_subheader_view');
    $this->load->view($content_view);
    $this->load->view('includes/_sidebar_view');
    $this->load->view('includes/_footer_view');
And nothing more...

The index function looks like this:
Code:
function index()
    {

$this->output->enable_profiler(TRUE);  
      $data['pageName'] = 'home';
    $data['css'] = $this->css;
    $data['base'] = $this->base;
    $data['content_view'] = 'view_content_view';

        $this->load->view('includes/template', $data);

    }

The "view_content_view" is in the view root...

At home... on my local machine (Win7Pro, running latest XAMPP) it all works great. When I uploaded it to my test site at my host (running Linux and php5)... nothing... I did remember to change the base_url in the config file... and the default controller is "view" -- but when I go to /index.php/view/index ... all I get is a blank page... no output or anything.

So, I started adding echo statements to track where it was going... everything runs fine up to the loading of the template view.

If I add echo("Hai there!"); to just before the load->view in the controller, and inside the template.php file AND just after the load->view command.... I get "Hai there!Hai there!" ... when I expected "Hai there!Hai there!Hai there!" ... that tells me that the view isn't loading correctly. I even took the load views out of the template and put themn directly in the controller, no dice. I even (just now) changed it so that it would load a view directly (instead of the template)... same blankness I get from my 6-year old sometimes.

HALP!

Clearly I've overlooked something, but for the life of me, I cannot think of what.
If necessary, I can post more code chunks, run diagnostics, what ever. Like I've mentioned, I've searched the forums, and didn't find anything like this. I've turned on error reporting, nothing. Tried the Diagnostics option... nothing useful there.

Note... If I run /index.php/view/somefuncdoesntexist... .I get the CI 404 error I've come to know and dislike... so I'm pretty sure it's not a problem with CI ... it could be my setup... could be I missed a comment or a php tag somewhere too...

Any help would be appreciated.

-tg


Messages In This Thread
Blank Views - head scratcher - by El Forum - 09-15-2010, 01:56 PM
Blank Views - head scratcher - by El Forum - 09-15-2010, 02:01 PM
Blank Views - head scratcher - by El Forum - 09-15-2010, 02:38 PM
Blank Views - head scratcher - by El Forum - 09-15-2010, 03:05 PM
Blank Views - head scratcher - by El Forum - 09-15-2010, 07:23 PM
Blank Views - head scratcher - by El Forum - 09-15-2010, 09:38 PM
Blank Views - head scratcher - by El Forum - 09-16-2010, 05:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB