Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Class 'Registration_Form' not found in [Directory]
#1
Information 

Hello,
I am newbie there. I have a problem with codeigniter v3

I have been watching tutorial from Lynda.com about Learning basic Codeigniter functions.

When i was watching the tutorial, it seems trainer was building class & functions and execute the classes, but i can't run the code as well. I have followed an instruction to build a Model class and Controller class.

But, i got error when execute and run the code....

PHP Code:
Fatal error: Class 'Registration_Form' not found in F:\xampp\htdocs\application\models\application.php on line 3
A PHP Error was encountered

Severity
Error

Message
: Class 'Registration_Form' not found

Filename
models/application.php

Line Number
3

Backtrace


It will be great if someone has any idea about why this error code showing. I guess the trainer was training with Earlier version of codeigniter and i am using the latest one. Is there anything needs to be changed?

Thank you.
Reply
#2

There is no anything to change, i think your error told me clearly, let figure out by you error

Fatal error: Class 'Registration_Form' not found in F:\xampp\htdocs\application\models\application.php on line 3


Registration_Form <-- this class not exist in application.php


Hope this help you Big Grin
Reply
#3

(05-03-2015, 09:25 PM)freddy Wrote: There is no anything to change, i think your error told me clearly, let figure out by you error

Fatal error: Class 'Registration_Form' not found in F:\xampp\htdocs\application\models\application.php on line 3


Registration_Form <-- this class not exist in application.php  


Hope this help you Big Grin

Thank you very much for your reply. Unfortunately, i have added the above class name into application.php Model file.


PHP Code:
<?php


    
class Application extends Registration_Form  {
     const DB_TABLE 'registration';
    const DB_TABLE_PK '$registration_id'

This file is starts like this....

I am very much curious how to extend the classes and add custom homepage for my site with database connectivity. This means, some of the data should be collected from my Database....

I am using XAMPP windows 64 bit version with MySQL database connectivity. If there is any other script idea for adding Model like this, it will be appreciated.

Thank you very much.
Reply
#4

This means that the class Registration_Form has not been loaded and/or can not be found by any currently-loaded autoloader.

Generally, Registration_Form would be in a file called Registration_Form.php, but there are a number of ways to ensure it has been loaded properly when Application.php is loaded.

Maybe you should start with the tutorial in the user guide, or make sure whatever tutorial you are using is for CI 3 and make sure you're not skipping anything.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB