Welcome Guest, Not a member yet? Register   Sign In
Unable to load the requested file: inlcudes/template.php
#1

[eluser]Bhavani Shekhawat[/eluser]
I dont understand why am I getting this error. Here is my code:

login.php(controllers)
Code:
<?php

class Login extends Controller{
    
    
  function index()
  {
     $this->load->helper('form');
     $this->load->helper('url');
     $data['main_content'] = 'login_form';
     $this->load->view('includes/template', $data);
  }
  
  function validate_credentials()
  {
      $this->load->model('membership_model');
      $query = $this->membership_model->validate();
      
      if($query)
      {
          $data = array(
          'username'=> $this->input->post('username'),
          'is logged in'=> true
          );
          
          $this->session->set_userdata($data);
          redirect('site/members_area');
      }
      else
      {
          $this->index();
      }
  }      
      function signup()
      {
          $data['main_content']='signup_form';
          $this->load->view('includes/template', $data);
      }
        
  }

  ?>


template.php (views->includes->template.php)
Code:
<?php     $this->load->view('includes/header');  ?>

<?php     $this->load->view($main_content);  ?>

<?php     $this->load->view('includes/footer');  ?>

signup_form.php(views)
Code:
<h1>Create Account</h1>

<fieldset>
<legend>Personal Information</legend>
&lt;?php
    
    echo form_open('login/create_member');
    echo form_input('first_name', set_value('first_name', 'First name'));
    echo form_input('last_name', set_value('last_name', 'Last name'));
    echo form_input('email_address', set_value('email_address', 'E-mail Address'));    
?&gt;
</fieldset>

<fieldset>
<legend>Login Info</legend>

&lt;?php
    echo form_input('user_name', set_value('user_name', 'Username'));
    echo form_input('password', set_value('password', 'Password'));
    echo form_input('password2', set_value('password2', 'Confirm Password'));
    
    echo form_submit('submit', 'Create Account');
?&gt;

&lt;?php
    echo validation_errors('<p class = "error">');
?&gt;
</fieldset>
#2

[eluser]vitoco[/eluser]
the error in the title says :

Unable to load the requested file: inlcudes/template.php

inlcudes != includes , but i cannot see the typo in the code.
#3

[eluser]kosaidpo[/eluser]
hello try to rename the file it hapened to me too n solved it by this even still dont kno why/how i got that




Theme © iAndrew 2016 - Forum software by © MyBB