Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C (/showthread.php?tid=62387) |
Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - ukuser33 - 07-08-2015 I have the following code which produces a registration form. It works fine on the page load but on POSTing it tells me that CI_formgenerator cannot be found - even though I've clearly not called the function that. What am I doing wrong? Code: public function index(){ The full error I get is: A PHP Error was encountered Severity: Error Message: Class 'CI_Formgenerator' not found Filename: core/Common.php Line Number: 196 Backtrace: {With no backtrace available} RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - Avenirer - 07-08-2015 There is no formgenerator library that comes with CodeIgniter (none that I know of...) RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - ukuser33 - 07-09-2015 No this is a library I've built myself & have added in. Thanks RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - Narf - 07-09-2015 What do you have in your application/core/ directory? RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - ukuser33 - 07-09-2015 I don't have an application/core folder. According to http://www.codeigniter.com/user_guide/general/creating_libraries.html you put it in your application/libraries folder. I've tried to keep things as "standard" as possible so the location of the file is application\libraries\Formgenerator.php with the following start to my code: Code: class Formgenerator { RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - Narf - 07-09-2015 (07-09-2015, 10:42 AM)ukuser33 Wrote: I don't have an application/core folder. According to http://www.codeigniter.com/user_guide/general/creating_libraries.html you put it in your application/libraries folder. I've tried to keep things as "standard" as possible so the location of the file is application\libraries\Formgenerator.php with the following start to my code: You do have an empty application/core/ directory by default ... if you don't, then you've manually removed it. Anyway, as I said in a similar thread, calling $this->load->library() will never trigger the load_class() function (which is the one that has line 196 of system/core/Common.php), unless you've made modifications to the framework. RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - ukuser33 - 07-09-2015 (07-09-2015, 11:59 AM)Narf Wrote:(07-09-2015, 10:42 AM)ukuser33 Wrote: I don't have an application/core folder. According to http://www.codeigniter.com/user_guide/general/creating_libraries.html you put it in your application/libraries folder. I've tried to keep things as "standard" as possible so the location of the file is application\libraries\Formgenerator.php with the following start to my code: RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - ukuser33 - 07-09-2015 Ok so how should one call this library() function or is it just a bug/broken? RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - Narf - 07-09-2015 (07-09-2015, 02:30 PM)ukuser33 Wrote: Ok so how should one call this library() function or is it just a bug/broken? It looks like you didn't quite understand me ... My point is exactly that the error you're getting has nothing to do with CI_Loader::library() and therefore could not possibly be a bug in the library loading logic. RE: Class 'CI_Formgenerator' not found in C:\Users\mycode\system\core\C - InsiteFX - 07-09-2015 If you named your library CI_formgenerator then remove the CI_ |