What is wrong with this code? Why the language doesn't load? - 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: What is wrong with this code? Why the language doesn't load? (/showthread.php?tid=40269) |
What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]ReyPM[/eluser] Hi every: I'm trying to load a language files but I'm getting this error: Quote:A PHP Error was encounteredWhere line number 6 is this: Code: 5 public function __construct() { Cheers and thx What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]InsiteFX[/eluser] Try loading the Language class and Language_helper! InsiteFX What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]ReyPM[/eluser] You mean in autoload? This: Code: $autoload['libraries'] = array('database','session','language','my_usession','encryptdecrypt'); What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]Unknown[/eluser] Hi, try this: Code: public function __construct() { What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]InsiteFX[/eluser] Show the structure of your application/language Directories! InsiteFX What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]ReyPM[/eluser] This is the structure of my application/language folder: - english index.html - spanish common_lang.php index.html user_lang.php What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]ReyPM[/eluser] Well something is really wrong here because I tried to load another library and get the same error: Quote:Severity: NoticeThe file brands.php is as follow: Code: <?php What is wrong with this code? Why the language doesn't load? - El Forum - 04-04-2011 [eluser]ReyPM[/eluser] Well I found the error just need to inherit from Controller constructor: Code: public function __construct() { |