Codeigniter 关于创建后端的建议
我想基于 codeigniter 制作一个非常小的 CMS。
我想从更有经验的开发人员那里得到一些建议。
我浏览了很多论坛,什么是最好的方法,但我遇到的更像是争论而不是提供有用的信息。
所以我想做的事情对我来说似乎是合乎逻辑的,将后端和前端分开。
你认为这是个好主意吗?
文件夹结构
[frontend]
/ controllers
/ views
/ models
[backend]
/ config
/ controllers
/ views
/ models
[sysetem]
index.php
我正在考虑另一种结构,比如在控制器、模型和视图中创建一个管理文件夹,但我有点害怕。
那么如果可能的话有人可以给我一些建议吗?
谢谢
I wold like to make a really small CMS based on codeigniter.
And i would like to get some advice from a more experienced developer.
I was reading through a lot of forums, what would be the best way but i bumped in more like of arguing rather than giving useful info.
So what i would like to do that seems logical to me that have the backend and frontend separated.
Do you think is a good idea?
folder structure
[frontend]
/ controllers
/ views
/ models
[backend]
/ config
/ controllers
/ views
/ models
[sysetem]
index.php
I was thinking another one, like creating an admin folder in the controllers, models and views but I'm a bit scared of that.
So could someone give me some advice if its possible?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
否 您应该在每个控制器、模型和视图文件夹中单独创建管理文件夹。这是一个很好的做法。这将使您更轻松地访问控制器、视图和模型,因为它们将具有集中的单个文件夹。
您的目录结构应该是这样的:
拥有这样的目录结构不是一个好主意,它会使它变得更加复杂:
希望这会有所帮助。
No You should create admin folder separatly in each controllers, models and views folders. Thats is a good practice. This will make it easier for you to access your controllers, views and models as they will have a centralized single folders.
You should have your directory structure like this:
Having directory structure like this is not a good idea and it will make it more complex:
Hope this helps.