CodeIgniter Tutorial News section |
(07-31-2015, 11:09 AM)Wouter60 Wrote: Check if your controller has multiple index() and view() functions in it. Your example code that you posted earlier this week shows that it does. Function names inside a class must be unique. When the documentation says that you have to add code to the index function in your controller, don't create a new function, but put the extra code before the closing curly brace of the existing index function. The same goes for the view() function. (1) Yes there were multiple index() and view() functions in News.php, so I've fixed that and now this is my current News.php file. Code: <?php After changing that I now get this error message An Error Was Encountered Unable to load the requested class: Authentication (2) I've checked C:/xampp/htdocs/MyProject/index.php and changed this line define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); to define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production'); but the results are no different however above that line it says NOTE: If you change these, also change the error_reporting() code below but there are 3 error_reporting() codes and I don't know which to change error_reporting(-1); error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); (3a) When I point my browser to http://localhost I get the XAMPP Welcome message and the URL changes to http://localhost/xampp/ but you say I should get "welcome page of your server" so I guess that means Apache server. (3b) I've renamed 2 htaccess files to htaccess_org C:/xampp/htdocs/MyProject/htaccess_org C:/xampp/htdocs/MyProject/application/htaccess_org Having done all of that I still get the error message An Error Was Encountered Unable to load the requested class: Authentication I've searched many files but can't find a class named "Authentication". |
Welcome Guest, Not a member yet? Register Sign In |