CodeIgniter - 在哪里放置 CMS
我的背景是使用 MySQL 和 PHP 从头开始编写客户网站项目。它们通常是面向公众的网站,混合了静态内容、动态内容以及一些功能(即帐户、搜索等)。没什么太重的。
因此,我通常会编写一个小型 CMS 站点,让他们更新所需的内容,将其放入受保护的文件夹中,仅此而已。
现在我想在我的下一个站点中使用 CodeIgniter 和更多 MVC 方法。我应该采取什么措施将 CMS 与网站的其他部分分开,还是只是另一个区域(具有自己的控制器/模型等)和额外的身份验证?
I come from a background of coding my client website projects from scratch with MySQL and PHP. They are typically public facing sites with a mixture of static content, dynamic content plus a little functionality here and there (i.e. account, searching etc). Nothing too heavy.
So I generally code up a little CMS site to let them update what they need to, put it in a protected folder and that's that.
Now I'd like to use CodeIgniter and more of a MVC approach for my next site. Should I be doing anything to separate the CMS out from the rest of the site or is it simply another area (with its own controllers/models etc) and extra authentication?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有几种在 CodeIgniter 中创建管理界面的好方法,如下所述:
http://philsturgeon.co.uk/news/2009/07/Create-an-Admin-panel-with-CodeIgniter
您可能主要想看看他的列表中的“#2” ;它很轻,不需要太多额外的工作。
There are several good methods to create an admin interface in CodeIgniter described at:
http://philsturgeon.co.uk/news/2009/07/Create-an-Admin-panel-with-CodeIgniter
You probably will want to look mostly at "#2" on his list; it's lightweight and not much additional work.
CMS 是网站的一部分,如果您所说的 CMS 指的是应用程序的管理面板/后端,您可以使用 coreylink 提供的上述链接,因为它详细介绍了创建管理面板的不同方法。
我个人的偏好是在我的控制器目录中创建一个名为“admin”的文件夹,并创建语义上有意义的名称,这样我的网址就是 webapp.com/admin/users 等。
The CMS is part of the site, if by CMS you mean administration panel / backend of your application, you can use the above link provided by coreylink as it details different ways to create an admin panel.
My personal preference is to create a folder called 'admin' in my controllers directory and create semantically meaningful names so my urls are webapp.com/admin/users and so on.