• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Models won't load

#21
(12-09-2014, 08:12 AM)afenker1985 Wrote: I did what you asked, and now I just get a blank screen instead of the CI error message.

controllers/welcome.php

PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class 
Welcome extends CI_Controller {

    
/**
     * Index Page for this controller.
     *
     * Maps to the following URL
     *         http://example.com/index.php/welcome
     *    - or -  
     *         http://example.com/index.php/welcome/index
     *    - or -
     * Since this controller is set as the default controller in 
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/welcome/<method_name>
     * @see http://codeigniter.com/user_guide/general/urls.html
     */
    
public function __construct() {
        
parent::__construct();
        
        
$this->load->model('nav_m_model');
    }
    
    public function 
index()
    {
        
$this->create_menu();
        
$this->load->view('header');
        
$this->load->view('welcome_message');
        
$this->load->view('footer');
    }
    private function 
create_menu() {
        
$data['query'] = $this->nav_m_model->get_active_albums();
     
   print_r($data);
 
  }


I edited my answer above.
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply


Messages In This Thread
Models won't load - by afenker1985 - 12-06-2014, 10:49 AM
RE: Models won't load - by InsiteFX - 12-06-2014, 06:26 PM
RE: Models won't load - by afenker1985 - 12-08-2014, 09:53 AM
RE: Models won't load - by skinner92 - 12-06-2014, 07:40 PM
RE: Models won't load - by bw.balazs - 12-07-2014, 04:48 AM
RE: Models won't load - by skinner92 - 12-07-2014, 04:34 PM
RE: Models won't load - by afenker1985 - 12-08-2014, 10:00 AM
RE: Models won't load - by twpmarketing - 12-08-2014, 01:09 PM
RE: Models won't load - by afenker1985 - 12-08-2014, 06:21 PM
RE: Models won't load - by Dracula - 12-09-2014, 05:39 AM
RE: Models won't load - by Dracula - 12-09-2014, 05:40 AM
RE: Models won't load - by Avenirer - 12-09-2014, 07:37 AM
RE: Models won't load - by Avenirer - 12-09-2014, 07:38 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 06:57 AM
RE: Models won't load - by Dracula - 12-09-2014, 07:19 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 07:34 AM
RE: Models won't load - by Dracula - 12-09-2014, 07:44 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 08:02 AM
RE: Models won't load - by Dracula - 12-09-2014, 08:08 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 08:12 AM
RE: Models won't load - by Dracula - 12-09-2014, 08:15 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 08:17 AM
RE: Models won't load - by Dracula - 12-09-2014, 08:28 AM
RE: Models won't load - by Dracula - 12-09-2014, 10:36 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 10:56 AM
RE: Models won't load - by afenker1985 - 12-09-2014, 11:25 AM
RE: Models won't load - by Dracula - 12-09-2014, 12:15 PM
RE: Models won't load - by Rufnex - 12-11-2014, 02:55 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.