Welcome Guest, Not a member yet? Register   Sign In
Naming of Controllers - any names not allowed?
#1

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?
Reply
#2

@webmachine,

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
Reply
#3

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

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".
Reply




Theme © iAndrew 2016 - Forum software by © MyBB