![]() |
problem creating a model - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: problem creating a model (/showthread.php?tid=40389) |
problem creating a model - El Forum - 04-07-2011 [eluser]Oblium[/eluser] I have this model: Code: class Elenco_model extends CI_Model { saved in a file called elenco_model.php in model folder I've also this controller: Code: class Blog extends CI_Controller { in a file called blog.php in the controller folder. As i try to call path like "../blog/insertdata/titolo1/descrizione1/" it gives me this error: Quote:A PHP Error was encountered What's wrong in my code? Thanks problem creating a model - El Forum - 04-07-2011 [eluser]toopay[/eluser] this not the final solution, try to call your model diractly/statically, just check if this work.. Code: ... problem creating a model - El Forum - 04-07-2011 [eluser]Oblium[/eluser] Nothing changed, it has just moved the error from Quote:core/Model.php to Quote:models/elenco_model.php problem creating a model - El Forum - 04-07-2011 [eluser]Oblium[/eluser] I found my problem, i didn't connect with database ._. I solved in this way: Code: class Blog extends CI_Controller { Thank you, however ![]() problem creating a model - El Forum - 04-07-2011 [eluser]Unknown[/eluser] In 50th line made some modification. use double quote and then try. i hope it works for your code. problem creating a model - El Forum - 04-07-2011 [eluser]InsiteFX[/eluser] Load the database! InsiteFX problem creating a model - El Forum - 04-07-2011 [eluser]Oblium[/eluser] Yep, i noticed ![]() |