Welcome Guest, Not a member yet? Register   Sign In
HMVC and Layout = problems
#1

[eluser]groyk[/eluser]
Hi Guys

I have a BIG problem with all my pages generated with CI.

I use HMVC and a layout class


In ALL my pages I get either -- or --- as the first charters in all pages witch is really annoying. I believe this is why my app can't run at my production server! See error message below
Quote:A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/e-smith/files/ibays/ipcam/html/ci_1.7.2/codeigniter/CodeIgniter.php:1)

Filename: libraries/Session.php

Line Number: 662

Here is the first 2 lines of one of my pages

Code:
--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

I don't know if it can be an encoding problem, but it seems like I have the same problem with both my development server and my production server!

Layout class:
Code:
&lt;?php  
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Layout
{
    
    var $obj;
    var $layout;
    
    function Layout($layout = "layout_main")
    {
        $this->obj =& get_instance();
        $this->layout = $layout;
    }

    function setLayout($layout)
    {
      $this->layout = $layout;
    }
    
    function view($view, $data=null, $return=false)
    {    
        $loadedData = array();
        $loadedData['content_for_layout'] = $this->obj->load->view($view,$data,true);
        
        if($return)
        {
            $output = $this->obj->load->view($this->layout, $loadedData, true);
            return $output;
        }
        else
        {
            $this->obj->load->view($this->layout, $loadedData, false);
        }
    }
}
?&gt;

Hoping that someone can help me out!


Messages In This Thread
HMVC and Layout = problems - by El Forum - 01-24-2010, 02:24 PM
HMVC and Layout = problems - by El Forum - 01-24-2010, 03:53 PM
HMVC and Layout = problems - by El Forum - 01-25-2010, 12:02 AM
HMVC and Layout = problems - by El Forum - 01-25-2010, 06:20 AM
HMVC and Layout = problems - by El Forum - 01-25-2010, 01:22 PM
HMVC and Layout = problems - by El Forum - 01-25-2010, 02:00 PM
HMVC and Layout = problems - by El Forum - 01-25-2010, 02:52 PM
HMVC and Layout = problems - by El Forum - 01-25-2010, 06:17 PM
HMVC and Layout = problems - by El Forum - 01-26-2010, 01:10 PM
HMVC and Layout = problems - by El Forum - 01-26-2010, 02:08 PM
HMVC and Layout = problems - by El Forum - 01-26-2010, 10:08 PM
HMVC and Layout = problems - by El Forum - 01-27-2010, 12:04 AM
HMVC and Layout = problems - by El Forum - 01-27-2010, 12:12 AM
HMVC and Layout = problems - by El Forum - 01-27-2010, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB