Welcome Guest, Not a member yet? Register   Sign In
Non-existent class error when try to load a library
#1

[eluser]airween[/eluser]
Hello all,

I have this structure (CI 1.7.2):
- models/pdfbook_model.php - contains PDFBook_model, which extends base CI Model
- libraries/PDFBook_model.php - contains many extends of TCPDF base class, which generates different formats of PDF files

CI Model collects all data from SQL database (MySQL), and sorts them, creates structures, and so on. After my library generates PDF - it's simple.

So, I have to create same PDF files, just rows comes another tables (published rows). I think I just copied models/pdfbook_model.php to models/pdfbookpub_model.php, change the class name and tables name, and that will be good (because represent "layer" has no changed) - but no Sad. When I want to generate these new PDF, I get an error message: "Non-existent class: PDFBook_model".

If I change the name of library from PDFBook_model to PDFBookpub_model in models/pdfbookpub_model.php, and create a symlink (!) from libraries/PDFBook_model to libraries/PDFBookpub_model, everything's fine.

And I don't know why - could anybody help me?


Thanks:


a.




Theme © iAndrew 2016 - Forum software by © MyBB