php error at the time of hosting

Asked

Viewed 120 times

0

I’m having a problem with hosting a college job, the problem is this one: inserir a descrição da imagem aqui

In localhost this error does not appear. inserir a descrição da imagem aqui

The error in line 98 of the theme/top code is this

    <?php if($this->session->flashdata('success') != null){?>
                        <div class="alert alert-success">
                          <button type="button" class="close" data-dismiss="alert">&times;</button>
                          <?php echo $this->session->flashdata('success');?>
                       </div>
                  <?php }?>

                  <?php if(isset($view)){echo $this->load->view($view);}?>

The code of the Mapos controller is this:

    public function index() {

    $this->data['ordens'] = $this->mapos_model->getOsAbertas();
    $this->data['produtos'] = $this->mapos_model->getProdutosMinimo();
    $this->data['os'] = $this->mapos_model->getOsEstatisticas();
    $this->data['estatisticas_financeiro'] = $this->mapos_model->getEstatisticasFinanceiro();
    $this->data['menuPainel'] = 'Painel';
    $this->data['view'] = 'mapos/painel';
    $this->load->view('tema/topo',  $this->data);

}

The last error is from an index file of codeigniter, which I did not modify anything, because it is standard. I can not find what is giving this error, all applications are working normally, but if this error does not go away, the teacher will not accept the job. He already warned that the application has to be working in the hosting. What I can do to make this mistake go away, since it is not giving problem in anything of the application?

1 answer

1

I found the error, the manual that the teacher gave to work with codeigniter was outdated, I am using the latest version of the framework, dai in line 98 of the theme code/ top is this the code that was:

<?php if(isset($view)){echo $this->load->view($view);}?>

The right for newer versions is like this: <?php if(isset($view)){ $this->load->view($view);}?> Without the echo.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.