Welcome Guest, Not a member yet? Register   Sign In
Noob Help Unable to load the requested class
#1

[eluser]Unknown[/eluser]
Hi Folks,

You must hear this all the time, I'm pretty new to PHP and CI, I'm following the video series on nettuts+ I'm currently on day 5. I have been able to de-bug most of my errors so far but I'm struggling with this one:

Unable to load the requested class: data

I have gone back over the video a number of times and my code is the same as his, yet his works.

When I go to: http://localhost/ci/index.php/site/create I get the above error.

Can anyone help me with this?

Model: name= site_model.php
Code:
<?php

class Site_model extends Model {
    
        function get_records()
        {
            $query = $this->db->get('data');
            return $query->result();
        }
    
        function add_record($data)
        {
            $this->db->insert('data' , $data);
            return;
        {
        
        function update_record($data)
        {
            $this->db->where('id' , 3);
            $this->db->update('data' , $data);
        }
        
        function delete_row()
        {
            $this->db->where('id' , $this->uri->segment(3));
            $this->db->delete('data');
        }
        
    }
?>

Controller: name= site.php
Code:
<?php
    class Site extends Controller {
        
        function index()
        {
        
        $this->load->view('options_view');
        
        }
        
    }
?>

View: name= options_view.php
Code:
<html>

<head>
<title> </title>
</head>

<body>

<h2>Create</h2
&lt;?php echo form_open('site/create');?&gt;

&lt;?php echo form_close(); ?&gt;

&lt;/body&gt;

&lt;/html&gt;


Messages In This Thread
Noob Help Unable to load the requested class - by El Forum - 07-18-2010, 06:01 AM
Noob Help Unable to load the requested class - by El Forum - 07-18-2010, 09:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB