Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9282945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:30:20+00:00 2026-06-18T18:30:20+00:00

I have some problems to use my own classes using codeigniter. If it is

  • 0

I have some problems to use my own classes using codeigniter. If it is not an error, it always says that the class can not be loaded.
For example, I created a class “Student” with atributes and only getter and setter methods, so I need to use that class in a model to return an array of “Students”(what I can not do with “load->library”) or to receive a “Student” for storing it, and I also need that class for my controller to do something with “Student”

I am working in Windows and I don’t want to use an ORM because de app is not big.

I also want to do something like this in my model:

while(something){
    $arr[] = new Student();
}
return $arr;

What can I do? I will be grateful for your answers.

(PD: I’m sorry, I am not an English speaker)

I solved it
The only thing I had to do was create the file Student.php (where the class Student is) and put it on Libraries, after that:

$this->upload->library("Student.php");

and after that we can “instanciar” the class .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:30:21+00:00Added an answer on June 18, 2026 at 6:30 pm

    What operating system are you developing on?

    On Unix based operating systems the file system is case sensitive so make sure that when your calling the library for example as:

    $this->load->library('student'); that the file on the disk is called Student.php. On Windows however the file system is case insensitive so this is not really an issue.

    For more information you should read:

    Case sensitive file names in Linux and not in Windows

    UPDATE

    From your comments it should like you wish to use your class like a library in which case you should include the file in the ‘libraries’ directory and load the library which is outlined in the documentation.

    $this->load->library('students');
    

    THen your will be able to use your method as such

    $this->students->method_name();
    

    Make sure you load the library manually as mentioned above autoload.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some C# library classes that make use of static variables. I use
I have few own APIs with around 2000 classes overall. Some of them use
I have some problems resizing a div with ID mask which I use to
i want to use .animate function but i have some problems i want to
I am just starting Java RMI and have some problems with when to use
i have some problems with a Query seem IN dosen't work with Group_concat, that
I have some problems with Javascript. In fact, I'm just newbie in that script
I have some problems sending mails through SMTP using Spring's MailSender interface and the
I have the requirement that every user can change his own user name while
I have a base controller class that exposes some logging functionality to it's child

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.