1
I am developing a website with administrative area. I started it with the new version of Codeigniter 3.1.5.
In the main pages would be body of the site, already in the news pages the url would be as follows: www.exemplo.com/noticia/visualizar/id
with the controller
news and display function responding to url.
Already on the administrative page the link would be www.exemplo.com/admin
with the controller
admin
bringing the main page of the administrative area. From this URL controllers add news, photos, etc. Must respond to url for example: www.exemplo.com/admin/noticia/adicionar
with the controller noticia
after the admin
in the url. I thought I’d put two Framework in the hosting one in the root folder and the other in admin. But I don’t think I’m the best. I read about extends class
, but I don’t know if I’m on the right track.
Friend also tried this and it did not work, since I used this method in codeigniter 2.X, so I searched the net how to do in 3.x and found what I commented on the question. But I’ll try again, maybe I’ve been hit by something.
– Willian Coqueiro
Just to inform @Williancoqueiro this process was carried out in version 3 maybe missing something! got it? it also works in 2
– novic
And so. From your references that you gave me of the documentation I saw that really has to work. Amazing as I read the documentation before and did not find. kkk I thought I had detached from the previous version or was bug fix.
– Willian Coqueiro
Well, it doesn’t work. I have
controllers/home.php, controllers/noticia.php, controllers/admin.php, controllers/admin/noticia.php, controllers/admin/foto.php
and not for sure.– Willian Coqueiro
not sure what? What happens? @Williancok if you’re doing it wrong I think (an admin.php thing and then an admin folder can cause problems)
– novic
You have to evaluate your routes... for example if you can’t get on the route
/admin/foto
– novic
Now I’m on the mobile. More I can’t access direct. Really is the admin.php. Passed beaten. Tomorrow Vo try.
– Willian Coqueiro
It worked. It was the admin folder conflicting with the admin.php file inside the root folder of
controllers
– Willian Coqueiro