• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Naming of Controllers - any names not allowed?

I am building an application, and wanted to have one of the controllers called Resources. No matter what I try, my app will not allow me to use this name - when I try to use a link `<a href="<?php echo base_url(); ?>resources">`, I get an "Object Not Found" error instead of the page. With any of my other controllers, I have no issues. Is Resources a restricted word for controllers?


Did you follow the CI naming conventions for the Controller name and class? Is the permissions for the controller file correct?

Here is the documented list of reserved names https://www.codeigniter.com/user_guide/g...rved-names

do you want use <?php echo base_url('resources'); ?>

Autoload the url helper and write hyperlinks to controllers(/methods) like this:
PHP Code:
<?= anchor('resources','Go to Resources');?>

Also check if the Resources.php file has a Class named "Resources".

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.