Welcome Guest, Not a member yet? Register   Sign In
Controller in a subfolder per user guide is not working
#11

[eluser]TheFuzzy0ne[/eluser]
Oh yes, of course!

CodeIgniter first checks to see if the first segment is a controller. If it's not, only then does it go looking for a subdirectory. I wouldn't say it's a bug as it is desirable behaviour, but I'm not sure if it should be documented, as it's unlikely many people would fall into the same trap.

Glad to be of service. Whenever something goes wrong for me, I usually find starting from scratch is a good thing.
#12

[eluser]fuksito[/eluser]
It is not really convinient like for making an admin panel, At the construct of the admin controler i have check ups that it is an admin, and if I`ll want to split admin-controllers to subfolders I will need to post all this checks in every controller. Is there a way to call some default controller for every in subfolder
#13

[eluser]TheFuzzy0ne[/eluser]
Yes, you set the default controller in your config.php file. Mine is set to "homepage", so I have a "homepage.php" file in each controller subdirectory which usually serves as an index page.
#14

[eluser]rezzz[/eluser]
I'm having the same issue, and I even backed up my old one and installed from scratch, this time only creating the admin sub-folder and just copying the welcome.php controller into it and likewise with the view. Still doesn't work, and not sure what to do at this point Sad.
#15

[eluser]rezzz[/eluser]
nvm -- got it fixed -- this method does work -- sorry for the waste of posts
#16

[eluser]Ichabodcole[/eluser]
Just want to say, I also fell into this trap. I do think it would be a good idea to mention this in the section that explains how sub-folders work. It does make sense, but in my own case I accidentally had an unused file with the same name as my folder, and I just didn't realize it was causing the problem.

cheers




Theme © iAndrew 2016 - Forum software by © MyBB