[英]Backend And frontend for an application - Codeigniter
I need to ask a question that how to configure a CI system which consists both the admin as well as the frontend section into a single CI installation. 我需要问一个问题,即如何配置一个CI系统,该系统同时包含管理员和前端部分到单个CI安装中。
Thanks in advance 提前致谢
J Ĵ
Phil Sturgeon posted 3 methods for achieving this exact thing with recommendations on where each method may be used. Phil Sturgeon发布了3种实现这一目标的方法,并提出了可以使用每种方法的建议。 http://philsturgeon.co.uk/blog/2009/07/Create-an-Admin-panel-with-CodeIgniter http://philsturgeon.co.uk/blog/2009/07/Create-an-Admin-panel-with-CodeIgniter
I generally use a standard CI setup; 我通常使用标准CI设置; just with a separate controller(s) for the Admin area which controls authentication/admin interface/etcetera. 只需要一个用于Admin区域的独立控制器来控制认证/管理界面/等等。
Then just split down your views into separate folders front/ and admin/ 然后只需将您的视图拆分为单独的文件夹前/和管理员/
Under those you might have more sub folders 在那些你可能有更多的子文件夹
admin/settings/user.php
admin/settings/template.php
admin/content/newpage.php
and so on 等等
The relative path must be used when loading views contained within subdirectories. 加载子目录中包含的视图时,必须使用相对路径。
$this->load->view('admin/settings/user', $data);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.