CI 2.0 update now code isn't working |
[eluser]minerbog[/eluser]
Afternoon all, I have just updated to CI2.0 and the code I had working in 1.7.3 no longer works. The error I'm getting is: Code: A PHP Error was encountered The code is as follows: Customer Controller Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php Code: <div id="content"> I have updated all the constructors to __construct and extended to the new CI_{some controller or model} but can't get it to work?? Any Ideas? Many Thanks, Gavin.
[eluser]Frank Rocco[/eluser]
I would try changing: Code: $this->load->model(array('Common','Customers_model'));
[eluser]runemedia[/eluser]
I'm a CI noob, but perhaps this would help: https://bitbucket.org/ellislab/codeignit...when-using
[eluser]bubbafoley[/eluser]
loading the models with an array shouldn't cause a problem. Are you sure that the database is loaded?
[eluser]minerbog[/eluser]
O dear, how embarrassing is this!!! Quote:loading the models with an array shouldn’t cause a problem.babbafoley, you where spot on. I forgot to update the config/autoload.php file to load the database class!! DOH DOH DOH DOH DOH SLAP!!!!!
[eluser]InsiteFX[/eluser]
Controlller is now CI_Controller Model is now CI_Model InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |